search for: actioncontrollers

Displaying 20 results from an estimated 1375 matches for "actioncontrollers".

Did you mean: actioncontroller
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/.
2012 Sep 18
4
multiple modules defining same method included into a class
In Ruby, classes are never closed: you can always add methods to an existing class. This applies to the classes you write as well as the standard, built-in classes. All you have to do is open up a class definition for an existing class, and the new contents you specify will be added to whatever''s there. In the same regard, if module is used with the name of a pre-existing module that
2006 May 26
1
access a ActionControllers protected method from plugin?
I can''t belive I fit that in as the subject! I''m writing a plugin that will allow me to grab some text from a database and call the render method from ActionController on part of the text. I can''t seem to figure out how to access the render method of ActionController::Base. I keep getting the "uninitialized constant Execute" error. How can I do this?
2007 Oct 16
1
Stub ActionController::Base#params
Has anyone had any success stubbing ActionController::Base#params? The following is not intercepting calls to params[:foo] in my controllers: ActionController::Base.stub!(:params).and_return(:foo => ''bar'') -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/rspec-users/attachments/20071016/282a76ba/attachment.html
2006 Jan 10
4
Problem creating MockController
Hi there, I''m trying to create a mock controller to test the use of UrlHelper in ActionMailer. I''m trying this: require ''d:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.11.0/lib/action_controller'' # Re-raise errors caught by the controller. #class DiscussionsController; def rescue_action(e) raise e end; end class MockController < ActionController::Base def
2008 Mar 16
3
undefined method `redirect_to'
Hi all. I''m getting the following error in my app: undefined method `redirect_to'' for ActionController::Base:Class I''m using Windows 2000, Rails 2.0.2 and resource_controller (from James Golick). My controller: class CommentsController < ApplicationController include ResourceController::Controller belongs_to :post, :article, :photo create do
2008 Mar 14
3
ActionController <-> ActiveView code access ambiguity
Hi All! This is not a problem in general but i''ve just missed the point. If my application has a global state, which i have to use both throughout ActionController and ActiveView, then, where to place that state? E.g. if I do this: class ApplicationController < ActionController::Base protected def authenticated? !user.nil? end end then I can''t use that from any
2008 Apr 30
7
rescue_from issue with AWS - uninitialized constant
The new rescue_from in edge rails seems to conflict with ActionWebService, which I need for various other purposes. When I define, for example (with AWS gem installed): <b>rescue_from ActionController::RoutingError, :with => :page_not_found</b> I get the exception: <b>uninitialized constant ActionWebService::Dispatcher::ActionController::Base</b> OK, so AWS
2008 Mar 20
2
Anyone having problems with asset_host not getting set up right?
Hey All, I think I found a bug but I would be suprised since it would cause major problems. We setup the asset_host in init.rb with: if File.exist?(facebook_config) FACEBOOKER = YAML.load_file(facebook_config)[RAILS_ENV] ENV[''FACEBOOK_API_KEY''] = FACEBOOKER[''api_key''] ENV[''FACEBOOK_SECRET_KEY''] =
2007 Feb 10
3
recognize_path discrepency
hey all - wondering if someone would relive my confusion... given a model called say Meeting and a route as "map.resources :meetings" in the console: >>r=ActionController::Routing::Routes >>r.recognize_paths "/meetings" =>{:action="index",:controller=>"meetings"} all works as I expect, but if I do >>r.recognize_paths
2008 Aug 23
0
Why ActionController::Base.class_eval for includes?
Just out of curiosity, why does action_controller.rb include classes with class_eval instead of directly? I.e., why ActionController::Base.class_eval do include ActionController::Flash include ActionController::Filters ... end instead of just class ActionController::Base include ActionController::Flash include ActionController::Filters ... end -- Posted via
2007 Jun 27
5
Filter Ordering in Edge Rails (Rev 7143)
Filter chaining appears to behave in differently than Rails 1.2.x. It seems that I''m getting a lot of errors along the lines of: ActionController::ActionControllerError: filter #<ActionController::Filters::ClassMethods::BeforeFilterProxy:0x322f468 @filter=#<ActionController::Filters::ClassMethods::SymbolFilter: 0x322f4b8 @filter=:login_required>> was in the wrong place!
2006 Jun 16
0
rake spec controller test output hideus.
Is there any way to change the output of rake spec fails? The errors are just totally over the top ugly and not helpful. First of all the ruby -Ilib line always comes before each test and I find it distracting. But if an error occurs on something that is not nil it just gives me the entire contents of that object and that is no small matter when the object is a HTTP request response. Here is
2006 Jun 07
16
How dows RoR work?
This is so frustrating. Is RoR that easy to learn or is it hype or is it just me? I wonder how many newbies like me are surfing the docs trying to get a clue of the basics. Every tutorial I find is much the same, and seems to skip the fundmental parts. How should you understand the Ruby API http://api.rubyonrails.org/? What is < ActionController::Base? Can''t I set a cookie under
2009 Aug 28
4
InvalidAuthenticityToken
Hi guys What does the below line says ActionController::InvalidAuthenticityToken (ActionController::InvalidAuthenticityToken): -e:2:in `load'' -e:2 Please guide me -- Karthik.k Mobile - +91-9894991640
2006 Jul 14
6
Don''t understand :: in ActionController::Base
Maybe this should apply to Ruby forums directly, but I''ll try here. I understand the concept of classes and subclasses thanks to the excellent "Programming Ruby - The Pragmatic Programmer''s Guide". However, I don''t understand what :: signify in terms of inheritance, parent and child in e.g. ActionController::Base -- Posted via http://www.ruby-forum.com/.
2010 Jan 18
0
rails 3.0: ActionController::Base render()
Can anyone explain where render() comes from in ActionController::Base? I managed to trace it down only that far: ActionController::Base includes ActionController::Rendering where render() method is defined. This definition however calls to render of the superclass. Superclass is ActionController::Metal. Which in its turn inherits from AbstractController::Base. None of those have render () either
2011 Apr 12
0
Suppress ActionController::RoutingError in logs
My rails log get chock a block with things like <<<<<<<<<<<< ActionController::RoutingError (No route matches "/admin/Y- ivrrecording.php" with {:method=>:get}): ... ActionController::RoutingError (No route matches "/manager/html" with {:method=>:get}): .. ActionController::RoutingError (No route matches "/webdav/test" with
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",
2006 Jul 06
6
Problem with gettext and functional tests
Hi, I am using gettext to let my web application know several languages. All works fine, but since I integrated it, my functional tests don''t work any more. I keep getting the error message: NoMethodError: undefined method `cgi'' for #<ActionController::TestRequest:0xb77f7f88>. All right, TestRequest doesn''t have a cgi method. Therefore I just included this into