search for: render_404

Displaying 6 results from an estimated 6 matches for "render_404".

2006 Apr 22
3
how do I manually throw a 404?
I''m sure this has been asked before but a quick search on the web didn''t give me any hints.. I''d like to do this: @person = Person.find_by_name throw_page_not_found unless @person Anybody know how to do this, do I have to manually tinker with the response object? -- Posted via http://www.ruby-forum.com/.
2006 Mar 22
1
undefined method `respond_to'' when using Exception Notifier Plugin
I''m trying to use the exception notifier plugin and I''m getting this error message: NoMethodError (undefined method `respond_to'' for #<Adm::PeriodController:0xb74c9804>): /vendor/plugins/exception_notification/lib/exception_notifiable.rb:64:in `render_500'' /vendor/plugins/exception_notification/lib/exception_notifiable.rb:76:in
2006 Jun 06
2
Routing Priority and Unknown Action
I have a site that consists of a blend of static and dynamic pages. The solution I came up with uses the default routing to try to pair up a controller and action for the dynamic stuff and, if the url doesn''t jive, rails attempts to render the static content with a special controller just for rendering that. To allow the static content to use all sorts of user memorable URLs I used
2007 May 24
3
Exception Notification Plugin Question
Hi, I have two questions re the Exception Notifier plugin (i.e. which you install via "ruby script/plugin install exception_notification") Q1 - In it''s current setup (where it uses /public/500.html) is it possible to remove the "Status: 500 Internal Server Error Content-Type: text/html" text which seems to mysteriously get place at the top of the page? Q2 -
2009 Dec 25
18
rescue_from ActionController::RoutingError II
...cationSystem in Application Controller # instead include AuthenticatedSystem #Shnelvar debugger # This one gets hit #neither rescue_from seems to work rescue_from ActionController::RoutingError, :with => :route_not_found # rescue_from ActionController::RoutingError, :with => :render_404 protected def route_not_found debugger #this one does not render :text => ''What are you looking for ?'', :status => :not_found end #Shnelvar end end ------------------------ As I scour the internet for this I see several people having the same problem and...
2008 Mar 08
9
Validation error handling on related models
I have 2 models, entity and client. Entity has_one client and client belongs_to entity. Entity has attributes name and legal_name. Entity also has an unique index on (lower(name)). The pKey for both is the conventional Rails id. Client has a fKey constraint on entity_id and is indexed in entity_id. In controllers/clients_controller.rb I have: # GET /clients/new # GET /clients/new.xml