RSS Feed

class_navigation_for helper


# 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.