Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

syntax error, unexpected keyword_ensure, expecting end-of-input with Rails [closed]

I have the following code:

<%= form_tag(email_post_path, method: :put) %>
  <%= text_field_tag(:email) %>
  <%= submit_tag %>
<% end %>

and I get the error syntax error, unexpected keyword_ensure, expecting end-of-input - why is that?

I tried setting <%= end %> but that didn't help either ;)

like image 376
Xeen Avatar asked Dec 04 '22 04:12

Xeen


1 Answers

You forgot to add do with form_tag, it should look like this

<%= form_tag(email_post_path, method: :put) do %>
like image 112
Rajdeep Singh Avatar answered May 21 '23 17:05

Rajdeep Singh