Welcome to Working With Rails

 

Discussion Forums

Discuss all things Ruby on Rails with perhaps the web's most vibrant group of Ruby on Rails enthusiasts.
3 Posts
REST Error

Hi,

Im using REST implementation in my Application.

I kept lgoin button.

new_user_path, :update => 'result_div'%>

It is working fine in local system.

Same code is Showing errors in Server.

(ActionController::MethodNotAllowed (only get,put and deleterequests are allowed)

Please help me.

with regards: ANAS

i

Hi,

Im using REST implementation in my Application.

I kept lgoin button.

new_user_path, :update => ‘result_div’>

It is working fine in local system.

Same code is Showing errors in Server.

(ActionController::MethodNotAllowed (only get,put and deleterequests are allowed)

my form is "new.rhtml"

'result_div', :url=>users_path) do |f|%>




Please any one help me

with regards: ANAS

Hi Mohd,

What this means is that the routes (urls) that you have specified for this controller action only allows the http methods: GET, PUT and DELETE, the default method for any html form is the last of the 4 http verbs POST. A solution would be either allow the post method by editing your routes.rb file or try changing the method the form uses to PUT via :method => :put

for info on specifying routes see section 3.11.3 of http://guides.rubyonrails.org/routing_outside_in.html or alternatively to change your form, see more info on the options for remote_form_for try on the api (http://api.rubyonrails.org/)

Cheers, Jeremy

3 Posts
Login to add your message