Created
June 22, 2009 15:46
-
-
Save chrismear/134031 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Use in conjunction with the tab helper to create a list of tabs | |
# | |
# For example: | |
# | |
# <% tab_list do -%> | |
# <%= tab "Photos", campaign_photos_path(:campaign_id => @campaign), "campaign_photos", :selected %> | |
# <%= tab "Videos", campaign_videos_path(:campaign_id => @campaign), "campaign_videos" %> | |
# <%= tab "Information", campaign_information_path(:campaign_id => @campaign), "campaign_information" %> | |
# <% end -%> | |
def tab_list(id=nil, &block) | |
options = {:class => "ui-tabs-nav"} | |
options[:id] = id.to_s if id | |
content = capture(&block) | |
concat(tag(:ul, options, true)) | |
concat(content) | |
concat("</ul>") | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment