lib/jets/router.rb in jets-1.1.5 vs lib/jets/router.rb in jets-1.2.0
- old
+ new
@@ -24,9 +24,11 @@
get "#{name}/new", to: "#{name}#new" unless api_mode?
get "#{name}/:id", to: "#{name}#show"
post "#{name}", to: "#{name}#create"
get "#{name}/:id/edit", to: "#{name}#edit" unless api_mode?
put "#{name}/:id", to: "#{name}#update"
+ post "#{name}/:id", to: "#{name}#update" # for binary uploads
+ patch "#{name}/:id", to: "#{name}#update"
delete "#{name}/:id", to: "#{name}#delete"
end
def api_mode?
if Jets.config.key?(:api_mode) || Jets.config.key?(:api_generator)