Hi In the controller i have the code def sd_resolution_save_from_search_sd_ticket #Some code here sd_resolution_save_common_function redirect_to(:action => ''show_details'', :id => params[:id],:activeTab => 1) end So the result is executing the show_details with highlighted second tab (Did using a script .Tab in order 0,1,etc). But the problem is (not big) now the address bar of the browser like http://localhost:3000/service_desk/show_details/7?activeTab=1 So wgen ever i refresh the second tab highlighted.What I need is to highlight the first tab.How?How can I redirect to make address bar of browser like http://localhost:3000/service_desk/show_details/7 Thanks in advance Sijo -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
> > http://localhost:3000/service_desk/show_details/7?activeTab=1 > > How can I redirect to make address bar of > browser like > http://localhost:3000/service_desk/show_details/7 >GO TO config/routes.rb and add this line : ActionController::Routing::Routes.draw do |map| map.active_tab '':controller/:action/:id'', :controller=>''service_desk'', :action=> ''show_details'', :requirements => { :activeTab => /\d+/}, :activeTab => nil What do you think? Enjoy, Reinhart http://teapoci.blogspot.com -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Hi Thanks for your reply.But first time I need second tab highlighted.But after changing the routes.rb as you said it always highlighting the first tab.What I need is browser look like http://localhost:3000/service_desk/show_details/7 after execute above fnction rather than http://localhost:3000/service_desk/show_details/7?activeTab=1 So then the tab second will be highlighted and when i press refresh the first tab will.(My scrpt takes tab order as 0,1,etc. activeTab=1 is the second tab) Thanks Sijo -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
> So then the tab second will be highlighted and when i press refresh the > first tab will.(My scrpt takes tab order as 0,1,etc. activeTab=1 is the > second tab)What do you mean that is, if you refresh browser the tab 0 & 1 will be run together? if yes, it is in your controller not in routes. def show_details @all_details = [] for tab_id in 0..params[:activeTab].to_i @all_details << AnyModel.find(tab_id) end end sorry if I feel little bit ambiguous with your problem point. Cheers, Reinhart http://teapoci.blogspot.com -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Hi I think you did not understand my problem.In short during redirectiong in the function the activeTab param is visible in the browser address bar..How can I remove that. Is there any render :method => ''post'' or redirect_to :method => ''post'' Like that Regards Sijo -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
What about css? I guess you have tabs something like amazon or every other web site. When you click on an item to show you want to highlight a tab? If so you could have a different layout for Show or programitclly give the tab/list item an id. Then in you CSS make it look highlighted. Something like that? John I On Apr 18, 7:43 am, Sijo Kg <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> Hi > I think you did not understand my problem.In short during > redirectiong in the function the activeTab param is visible in the > browser address bar..How can I remove that. > Is there any render :method => ''post'' or > redirect_to :method => ''post'' > Like that > > Regards > Sijo > -- > Posted viahttp://www.ruby-forum.com/.--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Hi I want to create a tab panel, but did not get how to create it. Would you please help me..? Please write basic code snippet. Thanks in advance Ekta ekta.29june-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org On Apr 18, 4:31 pm, Sijo Kg <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> Hi > In the controller i have the code > > def sd_resolution_save_from_search_sd_ticket > #Some code here > sd_resolution_save_common_function > redirect_to(:action => ''show_details'', :id => > params[:id],:activeTab => 1) > end > > So the result is executing the show_details with highlighted secondtab > (Did using a script .Tabin order 0,1,etc). > But the problem is (not big) now the address bar of the browser like > > http://localhost:3000/service_desk/show_details/7?activeTab=1 > > So wgen ever i refresh the secondtabhighlighted.What I need is to > highlight the firsttab.How?How can I redirect to make address bar of > browser likehttp://localhost:3000/service_desk/show_details/7 > > Thanks in advance > Sijo > -- > Posted viahttp://www.ruby-forum.com/.--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---