Hi, I''m using redirect_to to return to a page after some processing has been done on some data. Here is an example of its usage: redirect_to :action => ''daily'', :day => params[:day], :month => params[:month], :year => params[:year] This is all great and I have access to my params[] in the ''daily'' method however all of these params appear in a query string, part of the URL: http://localhost:3004/bookings/daily?month=2&year=2007&day=8 Is there a way I can prevent this? Thanks Henry -- 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 -~----------~----~----~----~------~----~------~--~---
Henry Bourne wrote:> Hi, > > I''m using redirect_to to return to a page after some processing has been > done on some data. Here is an example of its usage: > > redirect_to :action => ''daily'', :day => params[:day], :month => > params[:month], :year => params[:year] > > This is all great and I have access to my params[] in the ''daily'' method > however all of these params appear in a query string, part of the URL: > > http://localhost:3004/bookings/daily?month=2&year=2007&day=8 > > Is there a way I can prevent this? > > Thanks > Henryyou could post it in a form using button_to or you could pretty it up by adding to the routes file -- 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 -~----------~----~----~----~------~----~------~--~---
Keynan Pratt wrote:> you could post it in a form using button_to or you could pretty it up by > adding to the routes fileSorry maybe I should have explained a bit better. I have a page containing a form which, when the user submits, the data is sent to a method that does processing. This method has no associated view and redirects to the ''daily'' method and it''s view on failure/success. As it has no view I can''t put a form in there. I had thought about using routes to hide it but I thought there may have been a way I could tell redirect_to to use POST instead of GET or something to fix it at source rather than by just hiding it? -- 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 -~----------~----~----~----~------~----~------~--~---
sorry that was my bad. since this controller method has no view could you call the second directly and then render its result within the original method? -- 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 -~----------~----~----~----~------~----~------~--~---
Technically yes. However the app itself is a lot more complex and involves a lot more parameters than I included in the example... I''ve been trying hard to follow the DRY principle so to reassign the params to what is required would cause me to double up some code. Hmmm... Maybe I''ll just hide it then! Any tips for making the URL show only the domain on every single page and nothing else like the current controller/action etc..? -- 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 -~----------~----~----~----~------~----~------~--~---