You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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!
The text was updated successfully, but these errors were encountered:
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!
The text was updated successfully, but these errors were encountered: