Hi,
My controller code is,
class MyController < ApplicationController
def my_method
puts "Inside my method"
end
end
In my routes.rb:
map.resources :my_controller, :collections => {:my_method => :post}
I have implemented the user authentication also. After login, when I try
to access the URL
''http://localhost:3000/my_controller/my_method'' it
shows the following error.
Unknown action
No action responded to show
This is because GET request is sent to the controller. It must be POST.
How can I make the method as POST?
Thanks in advance...
--
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
-~----------~----~----~----~------~----~------~--~---