As a newbie to Ruby on Rails, I understand that the "@" and ":" links have different meanings. I saw this post in SO, which describes some of the differences.
- @ indicates an instance variable (e.g. @my_selection)
- : indicates an alias (e.g.: my_selection)
I came across a situation where I had a standard MVC page, similar to all other forms / pages in my web application.
html.erb snippet
<%= form_for @my_selection do |f| %>
route.rb snippet
resources :my_selections
When I try to access this page, I get this error:
NoMethodError in selections
Showing C:/somedir/myapp/app/views/my_selections/index.html.erb where line
undefined method `my_selection_index_path' for #<#<Class:0x1197e5676>:0x25439c3b>
Line 16 is the fragment of the form shown above.
/ - . , erb : my_selection, , .
:
- : my_selections @my_selections?
- : my_selection ?