Skip to content

Instantly share code, notes, and snippets.

@Veejay
Created May 30, 2012 18:12
Show Gist options
  • Save Veejay/2838038 to your computer and use it in GitHub Desktop.
Save Veejay/2838038 to your computer and use it in GitHub Desktop.
def info_and_controls
content_tag :li, :class => (project.proposed? ? "proposed" : "") do
link_to model do
content_tag :span, model.client.try(:name) || "N/A", :class => "client-name"
content_tag :span, model.name, :class => "project-name"
content_tag :span, model.proposed? ? "Proposed" : ""
end
content_tag :div, :class => "controls" do
link_to "Edit", edit_project_path(model)
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment