X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/0f7c52a790a95484c4358251937ad4105abc5071..60542dcecbffe14a43098d9e68ee6ae05868df1e:/services/api/app/controllers/application_controller.rb diff --git a/services/api/app/controllers/application_controller.rb b/services/api/app/controllers/application_controller.rb index b191550240..b1e2a4008f 100644 --- a/services/api/app/controllers/application_controller.rb +++ b/services/api/app/controllers/application_controller.rb @@ -29,6 +29,9 @@ class ApplicationController < ActionController::Base include DbCurrentTime respond_to :json + + # Although CSRF protection is already enabled by default, this is + # still needed to reposition CSRF checks later in callback order. protect_from_forgery ERROR_ACTIONS = [:render_error, :render_not_found] @@ -120,7 +123,7 @@ class ApplicationController < ActionController::Base attrs_to_update = resource_attrs.reject { |k,v| [:kind, :etag, :href].index k } - @object.update_attributes! attrs_to_update + @object.update! attrs_to_update show end