I''ve create a operator_session_controller: class OperatorSessionsController < ApplicationController def destroy reset_session redirect_to ''https://.............'' end end I''ve put resource :operator_session in routes.rb. It''s all ok. Suddenly I see in routes.rb the line: get "operator_session/destroy" It was automatically put on. What does it mean? -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Can you please post the entire content of routes.rb. And what is your rails version and any other routes based plugins are installed in your application? -- Regards, T.Veerasundaravel. http://tinyurl.com/25vma7h @veerasundaravel -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
I''m using rails 3.0, I don''t have plugins installed but only gems and they are: abstract (1.0.0) actionmailer (3.0.0) actionpack (= 3.0.0) mail (~> 2.2.5) actionpack (3.0.0) activemodel (= 3.0.0) activesupport (= 3.0.0) builder (~> 2.1.2) erubis (~> 2.6.6) i18n (~> 0.4.1) rack (~> 1.2.1) rack-mount (~> 0.6.12) rack-test (~> 0.5.4) tzinfo (~> 0.3.23) activemodel (3.0.0) activesupport (= 3.0.0) builder (~> 2.1.2) i18n (~> 0.4.1) activerecord (3.0.0) activemodel (= 3.0.0) activesupport (= 3.0.0) arel (~> 1.0.0) tzinfo (~> 0.3.23) activerecord-jdbc-adapter (0.9.7-java) activerecord-jdbcpostgresql-adapter (0.9.7-java) activerecord-jdbc-adapter (= 0.9.7) jdbc-postgres (>= 8.4.701) activeresource (3.0.0) activemodel (= 3.0.0) activesupport (= 3.0.0) activesupport (3.0.0) arel (1.0.1) activesupport (~> 3.0.0) builder (2.1.2) erubis (2.6.6) abstract (>= 1.0.0) i18n (0.4.1) jdbc-postgres (8.4.701-java) mail (2.2.5) activesupport (>= 2.3.6) mime-types treetop (>= 1.4.5) mime-types (1.16) polyglot (0.3.1) rack (1.2.1) rack-mount (0.6.12) rack (>= 1.0.0) rack-test (0.5.4) rack (>= 1.0) rails (3.0.0) actionmailer (= 3.0.0) actionpack (= 3.0.0) activerecord (= 3.0.0) activeresource (= 3.0.0) activesupport (= 3.0.0) bundler (~> 1.0.0) railties (= 3.0.0) railties (3.0.0) actionpack (= 3.0.0) activesupport (= 3.0.0) rake (>= 0.8.4) thor (~> 0.14.0) rake (0.8.7) rubycas-client (2.2.1) activesupport thor (0.14.0) treetop (1.4.8) polyglot (>= 0.3.1) tzinfo (0.3.23) will_paginate (3.0.pre2) The routes.rb is: Sacchetti::Application.routes.draw do get "operator_session/destroy" resources :bags resources :admins resources :districts resources :operators do resources :deliveries end resources :rusers do resources :deliveries resources :doc_details resources :delegates end resource :operator_session match '':controller(/:action(/:id(.:format)))'' end I don''t understand that get "operator_session/destroy". On 28 September 2010 17:16, Veera Sundaravel <lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> wrote:> Can you please post the entire content of routes.rb. And what is your > rails version and any other routes based plugins are installed in your > application? > > -- > Regards, > > T.Veerasundaravel. > http://tinyurl.com/25vma7h > @veerasundaravel > -- > 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en. > >-- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
It just means that it''s a GET request from your browser as opposed to POST, PUT, or DELETE http methods. For example: GET would be used when you want to simply load a page, POST would be used if you wanted to submit a form. This is all pretty well documented in the rails guides: http://guides.rubyonrails.org/routing.html Luke On 2010-09-28, at 1:34 PM, Mauro wrote:> I''m using rails 3.0, I don''t have plugins installed but only gems and they are: > > abstract (1.0.0) > actionmailer (3.0.0) > actionpack (= 3.0.0) > mail (~> 2.2.5) > actionpack (3.0.0) > activemodel (= 3.0.0) > activesupport (= 3.0.0) > builder (~> 2.1.2) > erubis (~> 2.6.6) > i18n (~> 0.4.1) > rack (~> 1.2.1) > rack-mount (~> 0.6.12) > rack-test (~> 0.5.4) > tzinfo (~> 0.3.23) > activemodel (3.0.0) > activesupport (= 3.0.0) > builder (~> 2.1.2) > i18n (~> 0.4.1) > activerecord (3.0.0) > activemodel (= 3.0.0) > activesupport (= 3.0.0) > arel (~> 1.0.0) > tzinfo (~> 0.3.23) > activerecord-jdbc-adapter (0.9.7-java) > activerecord-jdbcpostgresql-adapter (0.9.7-java) > activerecord-jdbc-adapter (= 0.9.7) > jdbc-postgres (>= 8.4.701) > activeresource (3.0.0) > activemodel (= 3.0.0) > activesupport (= 3.0.0) > activesupport (3.0.0) > arel (1.0.1) > activesupport (~> 3.0.0) > builder (2.1.2) > erubis (2.6.6) > abstract (>= 1.0.0) > i18n (0.4.1) > jdbc-postgres (8.4.701-java) > mail (2.2.5) > activesupport (>= 2.3.6) > mime-types > treetop (>= 1.4.5) > mime-types (1.16) > polyglot (0.3.1) > rack (1.2.1) > rack-mount (0.6.12) > rack (>= 1.0.0) > rack-test (0.5.4) > rack (>= 1.0) > rails (3.0.0) > actionmailer (= 3.0.0) > actionpack (= 3.0.0) > activerecord (= 3.0.0) > activeresource (= 3.0.0) > activesupport (= 3.0.0) > bundler (~> 1.0.0) > railties (= 3.0.0) > railties (3.0.0) > actionpack (= 3.0.0) > activesupport (= 3.0.0) > rake (>= 0.8.4) > thor (~> 0.14.0) > rake (0.8.7) > rubycas-client (2.2.1) > activesupport > thor (0.14.0) > treetop (1.4.8) > polyglot (>= 0.3.1) > tzinfo (0.3.23) > will_paginate (3.0.pre2) > > The routes.rb is: > > Sacchetti::Application.routes.draw do > get "operator_session/destroy" > > resources :bags > > resources :admins > > resources :districts > > resources :operators do > resources :deliveries > end > > resources :rusers do > resources :deliveries > resources :doc_details > resources :delegates > end > > resource :operator_session > > match '':controller(/:action(/:id(.:format)))'' > end > > I don''t understand that get "operator_session/destroy". > > > > On 28 September 2010 17:16, Veera Sundaravel <lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> wrote: >> Can you please post the entire content of routes.rb. And what is your >> rails version and any other routes based plugins are installed in your >> application? >> >> -- >> Regards, >> >> T.Veerasundaravel. >> http://tinyurl.com/25vma7h >> @veerasundaravel >> -- >> 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >> To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >> For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en. >> >> > > -- > 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en. >-- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
On 6 October 2010 04:43, Luke Cowell <lcowell-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> It just means that it''s a GET request from your browser as opposed to POST, PUT, or DELETE http methods. For example: GET would be used when you want to simply load a page, POST would be used if you wanted to submit a form.Yes but I just have resource :operator_session in my routes.rb. My question is: why rails put automatically that get "operator_session/destroy"? -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
If you generated that controller then perhaps rails assumed a GET was the safest thing to default? -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
What command line did you use to generate it ? If you specify only one action I think it assumes that it''s a GET request even though destroy would usually correspond with a DELETE request. I suggest you delete the line and forget about it. Luke On 2010-10-06, at 1:46 AM, Mauro wrote:> why rails put automatically that get "operator_session/destroy"?-- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.