@@ -110,17 +110,17 @@ def jsonapi_link(*links)
110110
111111 if methods . include? ( :show )
112112 match "relationships/#{ formatted_relationship_name } " , controller : options [ :controller ] ,
113- action : 'show_relationship' , relationship : link_type . to_s , via : [ :get ]
113+ action : 'show_relationship' , relationship : link_type . to_s , via : [ :get ]
114114 end
115115
116116 if methods . include? ( :update )
117117 match "relationships/#{ formatted_relationship_name } " , controller : options [ :controller ] ,
118- action : 'update_relationship' , relationship : link_type . to_s , via : [ :put , :patch ]
118+ action : 'update_relationship' , relationship : link_type . to_s , via : [ :put , :patch ]
119119 end
120120
121121 if methods . include? ( :destroy )
122122 match "relationships/#{ formatted_relationship_name } " , controller : options [ :controller ] ,
123- action : 'destroy_relationship' , relationship : link_type . to_s , via : [ :delete ]
123+ action : 'destroy_relationship' , relationship : link_type . to_s , via : [ :delete ]
124124 end
125125 end
126126
@@ -136,22 +136,22 @@ def jsonapi_links(*links)
136136
137137 if methods . include? ( :show )
138138 match "relationships/#{ formatted_relationship_name } " , controller : options [ :controller ] ,
139- action : 'show_relationship' , relationship : link_type . to_s , via : [ :get ]
139+ action : 'show_relationship' , relationship : link_type . to_s , via : [ :get ]
140140 end
141141
142142 if methods . include? ( :create )
143143 match "relationships/#{ formatted_relationship_name } " , controller : options [ :controller ] ,
144- action : 'create_relationship' , relationship : link_type . to_s , via : [ :post ]
144+ action : 'create_relationship' , relationship : link_type . to_s , via : [ :post ]
145145 end
146146
147147 if methods . include? ( :update )
148148 match "relationships/#{ formatted_relationship_name } " , controller : options [ :controller ] ,
149- action : 'update_relationship' , relationship : link_type . to_s , via : [ :put , :patch ]
149+ action : 'update_relationship' , relationship : link_type . to_s , via : [ :put , :patch ]
150150 end
151151
152152 if methods . include? ( :destroy )
153153 match "relationships/#{ formatted_relationship_name } /:keys" , controller : options [ :controller ] ,
154- action : 'destroy_relationship' , relationship : link_type . to_s , via : [ :delete ]
154+ action : 'destroy_relationship' , relationship : link_type . to_s , via : [ :delete ]
155155 end
156156 end
157157
@@ -172,8 +172,8 @@ def jsonapi_related_resource(*relationship)
172172 end
173173
174174 match "#{ formatted_relationship_name } " , controller : options [ :controller ] ,
175- relationship : relationship . name , source : resource_type_with_module_prefix ( source . _type ) ,
176- action : 'get_related_resource' , via : [ :get ]
175+ relationship : relationship . name , source : resource_type_with_module_prefix ( source . _type ) ,
176+ action : 'get_related_resource' , via : [ :get ]
177177 end
178178
179179 def jsonapi_related_resources ( *relationship )
@@ -188,8 +188,8 @@ def jsonapi_related_resources(*relationship)
188188 options [ :controller ] ||= related_resource . _type . to_s
189189
190190 match "#{ formatted_relationship_name } " , controller : options [ :controller ] ,
191- relationship : relationship . name , source : resource_type_with_module_prefix ( source . _type ) ,
192- action : 'get_related_resources' , via : [ :get ]
191+ relationship : relationship . name , source : resource_type_with_module_prefix ( source . _type ) ,
192+ action : 'get_related_resources' , via : [ :get ]
193193 end
194194
195195 private
0 commit comments