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

Rails 5.1 form_with ActionView helper #99

Open
simoncal-saas opened this issue Jul 19, 2017 · 0 comments
Open

Rails 5.1 form_with ActionView helper #99

simoncal-saas opened this issue Jul 19, 2017 · 0 comments

Comments

@simoncal-saas
Copy link

simoncal-saas commented Jul 19, 2017

Re: Chapter 19, Section "Adding a Form to the Contact Page".

Error encountered and recorded in /app/log/development.log:

ActionView::Template::Error - wrong number of arguments (given 1, expected 0):
actionview (5.1.2) lib/action_view/helpers/form_helper.rb:715:in form_with' app/views/pages/contact.html.erb:4:in _app_views_pages_contact_html_erb__2365087659624534846_70041057497600'

Resolution:
Replace <%= form_with(:contact, url: contact_path) do |form| %>
with <%= form_with(scope: :contact, url: contact_path) do |form| %>
in /app/views/pages/contact.html.erb

# 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

1 participant