I implemented a restfull controller with all the right actions and views. Currently, it works great with the new_html.erb view, which uses form_for containing a structure such as:
<% form_for @ecard do |f| %>
watching some textbooks, I saw that people also use structure:
<% form_for :ecard do |f| %>
It sounds logical .. but when I try to use <% form_for : ecard do | f | %> the resulting message goes to another action, then using <% form_for @ecard do | f | %> ..
-> html result: -> html result: So I wonder what I'm missing, the difference is in use: ecard and @ecard are obvious when I look at the generated html, but I'm still wondering what arguments are behind this! So can someone please explain what the difference is and what structure I should use? It or
ruby ruby-on-rails
Marco
source share