Skip to content

Controller#set_tab instance method implemented but not documented #29

@jcamenisch

Description

@jcamenisch

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!

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions