Possible Duplicate:
What's the difference between colon “:” and fat arrow “=>”
I recently came across this line:
<%= link_to "sample app", '#', id: "logo" %>
I know about Hashes and the immutable keys that look like {:id => "logo"} but what is id:? If this is a hash, why does it not follow the normal convention?
That’s the new syntax introduced with Ruby 1.9. You can write it like that, or you could write it like this also:
The JSON style is just supported as a shorter alternative, and for people who like JavaScript.