techiferous / tabulous

Easy tabbed navigation for Rails
Other
322 stars 35 forks source link

Delete method with new syntax #31

Closed RoyTheB0y closed 11 years ago

RoyTheB0y commented 11 years ago

I can't see anywhere in the docs that shows me how to specify the delete method (as in this issue https://github.com/techiferous/tabulous/pull/23) with the new tab definition syntax

Logout_tab do text { 'Logout' } link_path { destroy_user_session_path} visible_when { user_signed_in? } enabled_when { user_signed_in? } active_when { in_action('destroy').of_controller('devise/sessions') } end

how do i specify the delete method?

techiferous commented 11 years ago

You don't. Tabs are for navigation, not actions with side-effects. Sign out should be a link or button, not a navigational tab.

Maybe what you're wanting is a dropdown menu of actions (kind of like menus in desktop apps), which you'd use something other than tabulous for.

I hope this clears it up for you!

techiferous commented 10 years ago

I've changed my mind. I took a philosophical stance that links are for navigation only, but in looking at how the very popular Twitter Bootstrap treats navs, they seem to be mixing the idea of "tabbed navigation" with "action menus".

In other words, my stance that tabs are for navigation only does not seem to be ubiquitous or even popular. So I could see how it could be frustrating using tabulous and wanting to have a tab or subtab be an action but be limited to only the GET HTTP verb.

So I added the http_verb tab declaration. You can now have your sign out.