similar to: Why prefix ActionController::UnknownAction with ::?

Displaying 20 results from an estimated 40000 matches similar to: "Why prefix ActionController::UnknownAction with ::?"

2006 Jul 04
0
ActionController::UnknownAction hangs application
I''m trying to override rescue_action_in_public() using the PP example, but my application hangs every time I generate an error. def rescue_action_in_public(exception) case exception.class when ActiveRecord::RecordNotFound, ActionController::UnknownAction render( :file => "#{RAILS_ROOT}/public/404.html", :status => "404 Not
2006 Feb 07
1
AWDWR: NameError (uninitialized constant UnknownAction) in rescue_action_in_public
I copied (and modified) this code from AWDWR: def rescue_action_in_public(exception) case exception when ActiveRecord::RecordNotFound, ActionController::UnknownAction render :template=>''/error'', :layout=>''application'', :status=>''404 Not Found'' else render :template=>''/error'',
2006 Feb 16
3
rescue_action_in_public question
I''m using the rescue_action_in_public example from the Agile book to handle errors and email serious ones to me. In my application.rb controller: def rescue_action_in_public(exception) logger.error("rescue_action_in_public executed") case exception when ActiveRecord::RecordNotFound, ActionController::RoutingError, ActionController::UnknownAction
2006 Feb 08
2
NameError (uninitialized constant UnknownAction)
Hi, I''m having a strange problem that only seems to be happening on our production server. I never get this error locally but get it quite often on the server. The other odd thing is it doesn''t seem to be resulting in any error pages on the site. Everything looks fine... I wanted to add a rescue_action_in_public to email me when there are errors. So I followed the
2006 Nov 08
0
routing error does not get caught by rescue_action_in_public
I have this in my application controller. def rescue_action_in_public(exception) logger.error("rescue_action_in_public executed") case exception when ActiveRecord::RecordNotFound, ::ActionController::UnknownAction, ::ActionController::RoutingError logger.warn("rendering 404 page") render(:file =>
2007 Jan 20
1
Missing action error not being caught
I keep getting a blank page containing only the following: "There was a controller specfic error processing your request." Though I have the following in my application.rb def rescue_action_in_public(exception) case exception when UnknownAction, ActiveRecord::RecordNotFound then render :controller => "application", :action =>
2009 Aug 07
4
ActionController::UnknownAction (No action responded to 22.
I try to switch my application from Rails 2.2.2 to Rails 2.3.3. In namespace :admin I have a resource-based controller. See controller class Admin::OSystemsController < Admin::BaseController def index ....... end def edit ......... end def update .......... end end Resource is added to routes.rb like map.namespace :admin do |admin| ............ admin.resources :o_systems,
2006 Jun 07
3
ActionController::UNKnownAction (No action responded to crea
Hello All, I''ve developed RoR on windowsXP have deployed that on Linux. Everythings works fine when working on windows. Things are fine on Linux too untill I try to create new entry. I tried but couldn''t find any relevent information why it should happen only to this "specific" create action. I''m saying this because different create on other forms are
2006 Mar 07
17
Handling Erros from AWDWR
I''m getting to the point now where I really need to start trapping the errors. So from my AWDWR book, I added the following directly from the book into application.rb... def rescue_action_in_public(exception) case exception when ActiveRecord::RecordNotFound, ActionController::UnknownAction render(:file => "#{RAILS_ROOT}/public/404.html",
2007 Sep 08
1
Unknown Action doesn't raise exception ?
As I am in development environment, I wrote in my config/environment.rb ActionController::Base.consider_all_requests_local = false in my application.rb, I wrote def rescue_action_in_public(exception) case exception when RoutingError, UnknownAction render :file => "#{RAILS_ROOT}/public/404.html", :status => 404 else logger.error
2007 Jan 15
5
ActionController::UnknownAction (No action responded to xxx)
I have a new method defined in a existing controller. All the methods I called in these are workable. But somehow the new method is not recognizable. ------------------new method I added-------------------------------------------- def push # if fair begin @product = Product.find(params[:id]) rescue logger.error("Attempt to access invalid product #{params[:id]}")
2005 Dec 16
1
Exception Locations?
I am trying to locate the following in the current 1.0 source tree: ActiveRecord::RecordNotFound ActionController::UnknownAction Looking at the API docs, I''ve been unable to track these down. Can someone help?
2010 Aug 08
2
issue with rescue_action_in_public! and testing 404 responses
Hello, I''m new to rails and I''m trying to wrap my heads around how to spec controllers using RSpec (using rails 3rc1 and rspec 2.0.0.beta.19). The problem I''ve run into is when I want to test that my controllers respond with a 404 for unfound records. Whenever I run the spec, the ActiveRecord::RecordNotFound exception is not caught by rails, causing the spec
2007 Jan 11
0
writing tests for rescue_action_in_public
I''m having trouble with rescue_action_in_public, both in getting it to work right in my rails app, and in writing tests to make sure. What I ultimately want to do is test for what a normal user would see when an error is trapped. I override local_request? like so: application.rb -------------- def rescue_action_in_public(exception) render :text => "oops" end def
2010 Aug 09
0
Exceptions in functional tests (rescue_action_in_public! broken?)
In 2.3, exceptions raised by controllers under functional tests were by default propagated to the test, but by using rescue_action_in_public! a test could trigger the production, public behavior and then use assert_response or similar to test the expected result. This was implemented via coordination between ActionController::Rescue and ActionController::TestCase::RaiseActionExceptions. This
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 =>
2006 Feb 03
2
testing to see if emails are sent out on exceptions
Hi, I''m using ActionController::rescue_action_in_public() to send emails when uncaught exceptions happen. Is it possible to write tests for that? Joe
2005 Dec 11
7
Catching Exceptions in ActionController
I''d like to be able to catch ActionController::MissingTemplate exceptions from within ActionControlle, *but*, MissingTemplate isn''t defined within my controllers!!! How is that possible - after all, all controller subclass ActionController, so how are exceptions it defines not there!? More importantly, how can I do this? -- Posted via http://www.ruby-forum.com/.
2009 Dec 25
18
rescue_from ActionController::RoutingError II
OK ... so I''m not supposed to use it but ... Why doesn''t rescue_from ActionController::RoutingError work witht he code from http://www.rubyplus.org/episodes/20-Extended-RESTful-Authentication-Rails-2-App.html class ApplicationController < ActionController::Base helper :all # include all helpers, all the time # See ActionController::RequestForgeryProtection for details
2008 May 11
2
UnKnownAction exception
Hi all, i''m new in ruby on rails. i created a controller which has 2 views index, add_to_cart & inside index i created "button_to" which references to add_to_cart view, but when i click on this button UnKnownAction exception appear to me, i don''t know why this happen --~--~---------~--~----~------------~-------~--~----~ You received this message because you are