I have two tabs displaying as intended using some Ajax, however I
can't make the behavior dynamic so that when I click on my second tab
"Calendar" I would see the active tab to be the "Calendar" and not the
"Photos" tab. In my case, the "Photos" tab stays active even though
the data is loaded for my "Calendar" tab. I want the controller name
and action name to dictate which tab should be displayed as active.
This is what I use in my _main_tab_nav.html.erb:
---------------------------------------------code
begins-------------------------------------------
add_tab do |t|
t.named "My Photos"
t.titled "See my photos!"
t.links_to_remote :update=>"main_tabnav_content", :url =>
show_photos_user_path(@user)
t.highlights_on :controller => "users"
end
add_tab do |t|
t.named 'Calendar'
t.titled "See my calendar!"
t.links_to_remote :update=> "main_tabnav_content", :url =>
show_event_calendar_user_path(@user)
t.highlights_on :controller => "users", :action =>
"show_event_calendar"
end
-----------------------end code---------------------
I tried figuring out the issue from the following resources but I seem
to be missing something:
http://wiki.github.com/paolodona/rails-widgets/tabnav
Please help!
Thanks,
SS
have you tried to add the action param in the highlights_on of first tab?
> --
> You received this message because you are subscribed to the Google Groups "Rails Widgets Dev" group.
> To post to this group, send email to rails-wi...@googlegroups.com.
> To unsubscribe from this group, send email to rails-widgets-...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/rails-widgets-dev?hl=en.
>
>
SS
On Mar 10, 3:22 am, Michele Franzin <michele.fran...@gmail.com> wrote:
> >http://groups.google.com/group/rails-widgets-dev/browse_thread/thread...