Pastie now auto-senses if line-wrap is a bad or good idea. Feedback?
## mark a section (Learn more)
This paste will be private.
## usage [rhtml] <%= edit employee %> ## result [html] <a href="/employees/1/edit">edit employee</a> ## the helper module ApplicationHelper def edit(record) name = record.class.name.underscore.humanize.downcase link_to "edit #{name}", edit_polymorphic_path(record) end end
Pasted January 20, 2008 8:05AM EDT
by Mislav
Channel #rails-contrib on irc.freenode.com
Embed