I am currently learning Ruby on Rails and I am curious why this is not working, I have a page called new.html.erb
, but in views I placed the following code <%= form_for :article, url: articles_path do |f| %>
in app/views/articles/new.html.erb
. However, I keep receiving the message:
app/views/articles/new.html.erb:3: syntax error, unexpected keyword_ensure, expecting keyword_end
app/views/articles/new.html.erb:5: syntax error, unexpected end-of-input, expecting keyword_end
new.html.erb
<%= form_for :article do |f| %>
<p>
<%= f.label :title %><br>
<%= f.text_field :title %>
</p>
<p>
<%= f.label :text %><br>
<%= f.text_area :text %>
</p>
<p>
<%= f.submit %>
</p>
<% end %>
Thanks in advance for any help!
Your blog is in a convincing manner, thanks for sharing such an information with lots of your effort and time
RépondreSupprimerruby on rails training
ruby on rails training India
ruby on rails training Hyderabad