Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

ActionView::Template::Error (no implicit conversion of Symbol into Integer): for Buttons with Blocks #11

Open
clveranis opened this issue Nov 6, 2017 · 2 comments

Comments

@clveranis
Copy link

clveranis commented Nov 6, 2017

Hi, I'm also now getting this same error as question #5 and probably #10. I didn't want to comment on issue #10 as I'm not sure if he's having the same issue nor did I want to comment on a closed issue.

The error is:
ActionView::Template::Error (no implicit conversion of Symbol into Integer):

Using the Code:

<%= f.button(type: "submit", class: "btn btn-primary btn-outline p-sm text-center w-150") do %>
  <i class="fa fa-bank fa-2x"></i>
  <h3 class="font-normal">Legal Pending</h3>
<% end %>

According to #5 it was resolved but I am still getting this error using Rails 5.0.2, jQuery 3.1.1, and jQuery_ujs. I've tried putting the calls in to sweet alert js files within application.js before jquery and jquery_ujs but no luck. I've confirmed that if I remove this gem then the button block works fine.

The usage for the button doesn't need to be f.button do but it does need to be a button with a block, so if there is something else I can change it to that I'm unaware of but known to work with your gem then I'm okay with that too.

Thanks!

@clveranis
Copy link
Author

I've since replaced the button block above with button_to to produce the desired results. So I'm fine on that front, however, the gem doesn't seem to work with button_to .. data: { confirm: .. }, only link_to .. data: { confirm: ..}.

@jjercx
Copy link

jjercx commented Mar 14, 2018

same problem here!

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants