Forum: Ruby on Rails using get and put

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
vishal mehta (Guest)
on 2008-12-18 10:53
(Received via mailing list)
Hello everyone,
 I am new to rails and I am trying to run simple get post put methods
in ruby rails. Can any one tell me where do I implement that methods.
Can you provide any source where I can go through and learn these
Vishwanath N. (Guest)
on 2008-12-18 13:59
(Received via mailing list)
Hi Vishal,

You can do the same in one single method in any controller and check
request.method which will have methods 'get' or 'post'
  def my_method
    if :post == request.method
      #Process post
      #Process get - usually just render the form

This topic is locked and can not be replied to.