Displaying 13 results from an estimated 13 matches for "methodnotallowed".
2009 Sep 19
2
MethodNotAllowed
...s. I have the sources broken down into types, such as
books, periodicals, web-sites, etc as single table inheritance on the
sources table. Routes are nested so that :articles, :has_many
=> :sources When trying to edit a source, through the "edit" view, I
get "ActionController::MethodNotAllowed - only get, put, and delete
requests are allowed". This should flow through the "update" action,
which is a put method, and when I used rake routes on the command line
it looks like it is routed correctly PUT /articles/:article_id/
sources/:id(.:format) {:controller => "...
2008 Aug 01
1
rescue_from ActionController::MethodNotAllowed
Hello,
I''m having some trouble handing ActionController::MethodNotAllowed
errors. Basically, the following is defined in my controllers, but
obviously I''m missing something. Thanks in advance for any light you
can shed.
- - - - - - - - - - - - - - - - - - - -
class UsersController < ApplicationController
rescue_from ActionController::MethodNotAllowed, :wi...
2008 Jul 19
0
Why MethodNotAllowed all of a sudden?
I''m using shortcuts for login, logout etc. in routes.rb, for example:
map.login ''login'', :controller => ''session'', :action => ''new''
When I access http://localhost:3000/login I get following exception:
ActionController::MethodNotAllowed
Only get, head, post, put, and delete requests are allowed.
Does anyone know what''s wrong there? I''m using 2.1.0 btw.
--
Posted via http://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Goo...
2008 Aug 25
0
ActionController::MethodNotAllowed
...w'', :conditions
=> { :method => :get }
emailfeeder.create ''/emailfeeder/create'', :action =>
''create'', :conditions => { :method => :post }
end
I can t really figure out why I m still having this error :
<h1>
ActionController::MethodNotAllowed
</h1>
<pre>Only post requests are allowed.</pre>
Can someone help with this issue please.
Thanks in advance,
Regards,
Joel
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Tal...
2009 Sep 24
4
Action Controller ::MethodNotAllowed
Hi,
Iam getting the following error
ActionController::MethodNotAllowed
Only get, put and delete requests are allowed.
Actually, Iam trying to have multiple actions for a form to create
new record. The actions for the form are cancel, save, publish and
preview.
here''s the config/routes.rb file code snippet for the relevant
controller - Events
map.resources...
2009 Jul 01
1
form_for resources with :singular specified
...quipment < ActiveRecord::Base
class EquipmentController < ApplicationController
The problem comes in my _form.haml partial that is used by new.haml
and edit.haml:
- form_for @equipment do |f|
This gives me an error saying "Only get and post requests are allowed.
(ActionController::MethodNotAllowed)"
I tried:
- form_for @equipment, equipment_instance_path(@equipment) do |f|
That gives the same error.
There has to be something better than:
- form_for @equipment, :url => (@equipment.new_record? ?
equipment_path : equipment_instance_path(@equipment)), :html =>
(@equipment.new_r...
2007 Aug 13
1
SqueezeBox, a new Mongrel handler
...ize.rb is loaded when the website starts, in
there you can define classes or functions that will be used throughout
the site. database.yml is looked for in the case you plan on using
ActiveRecord.
There are several predefined Ruby exceptions which correspond to
common HTTP errors like NotFound and MethodNotAllowed, and Forbidden.
For example one could do:
raise MethodNotAllowed unless @request.post?
Raising one of these exceptions will display a default error page -
but these error pages can be overridden by placing a template, for
example, at
document_root/exceptions/not_found.erb or
document_root/exc...
2009 Feb 10
2
rescue_from for NoMethodError
Hi everyone,
I was just trying to catch some exceptions in my app,
for "Record Not Found" I used this
in my application.rb file
rescue_from ActiveRecord::RecordNotFound, :with => :record_not_found
rescue_from ActionController::NoMethodError, :with => :show_error
private
def record_not_found
render :text => "404 Not Found", :status =>
2009 May 02
10
Problem verifying routing error
...support something like this in routes.rb:
map.resources :orders do |orders|
orders.resources :items, :except => [:index,:show]
end
I used to use lambda {}.should_raise( routing error ), but it stopped
detecting any raised error. Requesting it through the browser produces
ActionController::MethodNotAllowed (Only post requests are allowed). But
that error wasn''t detected.
When I skip the lambda, and just ask it to verify that the route does
exist (which *should* fail), I get the same result for those :except
actions as for a made-up action name. Seems this must have something to
do with the...
2007 Jan 31
2
SystemStackError: stack level too deep
I''m testing the http module in console.
BUt I got the following error.
Anyone knows why?
>> Net::HTTP.get_print ''www.google.com'', ''index.html''
SystemStackError: stack level too deep
from C:/InstantRails/ruby/lib/ruby/1.8/net/http.rb:451:in
`newobj''
from C:/InstantRails/ruby/lib/ruby/1.8/net/http.rb:451:in
2007 Dec 28
1
Getting wrong route - fairly complete error description
OK, I have a routing problem, that seems to be working in the console,
but not in the app.
I have people that have nested tasks, like so:
-------------------------------
# routes.rb
map.resources :people do |person|
person.resources :phone_notes
person.resources :documents
person.resources :tasks, :member => {:complete => :put}
end
map.resources :tasks, :member => {:complete =>
2007 Dec 28
1
Rake routes & console showing one thing, app doing another
OK, I have a routing problem, that seems to be working in the console,
and with rake routes but not in the app.
I have people that have nested tasks, like so:
-------------------------------
# routes.rb
map.resources :people do |person|
person.resources :phone_notes
person.resources :documents
person.resources :tasks, :member => {:complete => :put}
end
map.resources :tasks, :member
2008 Oct 11
5
Rails + Apache2 + Balancer Manager - PHP doesn't work
Hi
I have a Debian Server and I managed that Ruby works with Apache2 and
the Balancer Manager that listen to the Mongrel server.
The Problem is that PHP files don''t work anymore.
How do I have to configurate the Balance Manager that PHP is working
again like without the Balance Manager?
Greetings Andi
--
Posted via http://www.ruby-forum.com/.