class_navigation_for helper
Posted on Sunday, May 17, 2009 in About Tim Matheson, Cellphone Hacks, Do it yourself guides, Web Tools, Work
# The css classes used are for use with the Blueprint css framework
def class_navigation_for(object = nil, options = {})
unless object.nil?
options = {
:class => ’span-24 class-navigation’,
}.merge!(options)
content_tag(:div, options) do
content_tag(:p) do
link_to “New #{object.to_s.titleize}”, eval(”new_#{object.to_s.downcase}_url”)
end
end
end
end
Leave a Comment
You must be logged in to post a comment.