Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

ability to use a block for tab_for when using a custom builder #11

wants to merge 1 commit into


None yet
2 participants

cgs commented Mar 14, 2011

Title pretty much says it all. Thanks for the great plugin. Here's how I'm using this:

def tab_for(tab, name, options, item_options = {}, &block)
item_options[:class] = item_options[:class].to_s.split(" ").push("active").join(" ") if current_tab?(tab)
content = @context.link_to(name, options)
content += @context.capture(&block) if block_given?
@context.content_tag(:li, content, item_options)


weppos commented Mar 14, 2011

Thanks for the patch. Please consider adding some test cases to prove the feature works as expected.


weppos commented Mar 14, 2011

Duplicates #9

weppos added a commit that referenced this pull request May 20, 2011

This issue was closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment