Skip to content

Commit d972871

Browse files
committed
Make skipping the verify_authenticity_token action optional
This prevents the skip from raising an exception if it is not defined, and since it doesn't appear to be defined in a Rails 5 app this is helpful.
1 parent 4290154 commit d972871

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/kracken/controllers/json_api_compatible.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ def self.included(base)
126126
extend Macros
127127

128128
before_action :munge_chained_param_ids!
129-
skip_before_action :verify_authenticity_token
129+
skip_before_action :verify_authenticity_token, raise: false
130130

131131
if defined?(::ActiveRecord)
132132
rescue_from ::ActiveRecord::RecordNotFound do |error|

0 commit comments

Comments
 (0)