[ANN] link_to_magic
Published almost 6 years ago
Sorry for the lame name. I was gonna name it link_to_sexy initially, but changed my mind at the last moment ;-)
This plugin is inspired from Josh Peek’s stringgable_shortcuts & Geoff Buesing’s patch
To install :
script/plugin install http://linktomagic.googlecode.com/svn/link_to_magic/script/plugin install http://linktomagic.googlecode.com/svn/link_to_magic/To use :
1.
<%= link_to @person %><%= link_to @person %>This is short for doing <%= link_to h(@person.name), @person %>_. Here, a littile bit of ActiveRecord::Base.tos magic is involved too. Check out this pastie to understand what/how it does this.
2.
<%= link_to_something @person %><%= link_to_something @person %>This is short for doing <%= link_to h(@person.something), @person %>.
Comments/suggestions welcome!