@@ -824,58 +824,58 @@ module Routing {
824
824
}
825
825
826
826
/**
827
- * Holds if the (resource, method , path, action) combination would be generated by a call to `resources :<resource>`.
827
+ * Holds if the (resource, httpMethod , path, action) combination would be generated by a call to `resources :<resource>`.
828
828
*/
829
829
bindingset [ resource]
830
830
private predicate isDefaultResourceRoute (
831
- string resource , string method , string path , string action
831
+ string resource , string httpMethod , string path , string action
832
832
) {
833
833
action = "create" and
834
- ( method = "post" and path = "/" + resource )
834
+ ( httpMethod = "post" and path = "/" + resource )
835
835
or
836
836
action = "index" and
837
- ( method = "get" and path = "/" + resource )
837
+ ( httpMethod = "get" and path = "/" + resource )
838
838
or
839
839
action = "new" and
840
- ( method = "get" and path = "/" + resource + "/new" )
840
+ ( httpMethod = "get" and path = "/" + resource + "/new" )
841
841
or
842
842
action = "edit" and
843
- ( method = "get" and path = "/" + resource + ":id/edit" )
843
+ ( httpMethod = "get" and path = "/" + resource + ":id/edit" )
844
844
or
845
845
action = "show" and
846
- ( method = "get" and path = "/" + resource + "/:id" )
846
+ ( httpMethod = "get" and path = "/" + resource + "/:id" )
847
847
or
848
848
action = "update" and
849
- ( method in [ "put" , "patch" ] and path = "/" + resource + "/:id" )
849
+ ( httpMethod in [ "put" , "patch" ] and path = "/" + resource + "/:id" )
850
850
or
851
851
action = "destroy" and
852
- ( method = "delete" and path = "/" + resource + "/:id" )
852
+ ( httpMethod = "delete" and path = "/" + resource + "/:id" )
853
853
}
854
854
855
855
/**
856
- * Holds if the (resource, method , path, action) combination would be generated by a call to `resource :<resource>`.
856
+ * Holds if the (resource, httpMethod , path, action) combination would be generated by a call to `resource :<resource>`.
857
857
*/
858
858
bindingset [ resource]
859
859
private predicate isDefaultSingularResourceRoute (
860
- string resource , string method , string path , string action
860
+ string resource , string httpMethod , string path , string action
861
861
) {
862
862
action = "create" and
863
- ( method = "post" and path = "/" + resource )
863
+ ( httpMethod = "post" and path = "/" + resource )
864
864
or
865
865
action = "new" and
866
- ( method = "get" and path = "/" + resource + "/new" )
866
+ ( httpMethod = "get" and path = "/" + resource + "/new" )
867
867
or
868
868
action = "edit" and
869
- ( method = "get" and path = "/" + resource + "/edit" )
869
+ ( httpMethod = "get" and path = "/" + resource + "/edit" )
870
870
or
871
871
action = "show" and
872
- ( method = "get" and path = "/" + resource )
872
+ ( httpMethod = "get" and path = "/" + resource )
873
873
or
874
874
action = "update" and
875
- ( method in [ "put" , "patch" ] and path = "/" + resource )
875
+ ( httpMethod in [ "put" , "patch" ] and path = "/" + resource )
876
876
or
877
877
action = "destroy" and
878
- ( method = "delete" and path = "/" + resource )
878
+ ( httpMethod = "delete" and path = "/" + resource )
879
879
}
880
880
881
881
/**
0 commit comments