weppos / tabs_on_rails

Tabs on Rails is a simple Rails plugin for creating and managing tabs and navigation menus.
https://simonecarletti.com/code/tabs-on-rails
MIT License
294 stars 52 forks source link

Controller#set_tab instance method implemented but not documented #29

Open jcamenisch opened 11 years ago

jcamenisch commented 11 years ago

I just spent a good bit of time writing ten different calls to set_tab :x, if: ->{ condition } in a controller, to set the current tab based on given params. I got it working perfectly, but hated the whole approach. It was begging to have set_tab called from a before_action filter instead of at the class level.

It finally dawned on me that that might be possible, even though the documentation says nothing about the capability. I checked the source, and there it is!

May I suggest mentioning this somewhere in the documentation? Would you consider a pull request if I worked on writing something up?

No promises, but I might be able to take some time to do that—if there's a chance it would be merged.

Thanks!