cacheable-csrf-token-rails
cacheable-csrf-token-rails copied to clipboard
Rails 5.1.x compatibility issues
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 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: {}