I have been trying to get my application to simply pop open a simple widow with a form laid out in that window. I get it to open this window, but the error I get says: no route found to match "/enroll/airline_preferences.rhtml" with {:method=>:get} I have tried to place :method => ''post'' in my code with little success. I guess I don''t understand hwo different does RoR dehave based on whether it is a get or a post? Posts executes the method with the same name as the page upon load. How is get different. Also, I am using link_to to open up this page. Thanks, ~S -- 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 -~----------~----~----~----~------~----~------~--~---
On Aug 1, 2007, at 12:16 PM, Shandy Nantz wrote:> > I have been trying to get my application to simply pop open a simple > widow with a form laid out in that window. I get it to open this > window, > but the error I get says: > > no route found to match "/enroll/airline_preferences.rhtml" with > {:method=>:get} > > I have tried to place :method => ''post'' in my code with little > success. > I guess I don''t understand hwo different does RoR dehave based on > whether it is a get or a post? Posts executes the method with the same > name as the page upon load. How is get different. Also, I am using > link_to to open up this page. Thanks, > > ~SWell, seeing your routes.rb (the part that you expect to be relevant) would certainly help. You can manually add: :conditions => { :method => :put } to your map.connect (or named route) to require a certain type of request (the default is to allow any) You should also show the piece of your view that implements the form. -Rob Rob Biedenharn http://agileconsultingllc.com Rob-xa9cJyRlE0mWcWVYNo9pwxS2lgjeYSpx@public.gmane.org --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
if you''re using restful routes, e.g. "map.resources :enroll" in your routes, then you can add such a URL via map.resources :enroll, :collection => { :airline_preferences => :get } that enables the URL /enroll;airline_preferences it also provides the named route airline_preferences_enroll for usage in controllers and views to generate the URL. On Aug 1, 12:16 pm, Shandy Nantz <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> I have been trying to get my application to simply pop open a simple > widow with a form laid out in that window. I get it to open this window, > but the error I get says: > > no route found to match "/enroll/airline_preferences.rhtml" with > {:method=>:get} > > I have tried to place :method => ''post'' in my code with little success. > I guess I don''t understand hwo different does RoR dehave based on > whether it is a get or a post? Posts executes the method with the same > name as the page upon load. How is get different. Also, I am using > link_to to open up this page. Thanks, > > ~S > -- > 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 -~----------~----~----~----~------~----~------~--~---