cacheable-csrf-token-rails icon indicating copy to clipboard operation
cacheable-csrf-token-rails copied to clipboard

Rails 5.1.x compatibility issues

Open acrolink opened this issue 8 years ago • 1 comments

I have forked the gem and made Rails 5.1.x specific changes (due to deprecation): https://github.com/acrolink/cacheable-csrf-token-rails/commit/570645e0e94327bbdb70755118cc1d5a364d14ce and https://github.com/acrolink/cacheable-csrf-token-rails/commit/2c08df60aeaee64c2e94247f2d1c3de486a96248

but I am getting this error: wrong number of arguments (given 2, expected 0..1)

in the line: <%= simple_form_for @work, :html => { :class => 'form-horizontal' } do |f| %>

Any idea what might be going on here? Thanks.

acrolink avatar Sep 13 '17 08:09 acrolink

@acrolink You need to add form_options: keyword argument to token_tag method definition, like it done in Rails 5. def token_tag token = nil, form_options: {}

VitaliyAdamkov avatar Aug 11 '20 12:08 VitaliyAdamkov