I’m trying to learn ruby on rails. I’ve been going through a tutorial, but I’ve gotten stuck.
It has me using start_form_tag and end_form_tag around an input form. However, when I access the page, I get undefined method 'start_form_tag' for #<ActionView::Base:0x2556020>
In the tutorial, they explain that these two lines are translated into <form action="/book/create" method="post"> and </form>. As such, I tried putting those instead. The form out come up, but when I submitted the form, I get this error: ActionController::InvalidAuthenticityToken in BookController#create
So,
- What do I have to do to get start_form_tag to translate correctly?
- Is this causing the InvalidAuthenticityToken error?
I had the same problem when I started learning Rails. You have tutorial for old Rails version.
start_form_tagis no longer used. I think the best place to learn Rails is Rails GuidesSo, your question now. You can add form like this: