Displaying 20 results from an estimated 1375 matches for "actioncontrol".
Did you mean:
action_control
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?
--...
2012 Sep 18
4
multiple modules defining same method included into a class
...heir context.
When you include a module in a class, without a prefix (prefix meaning
something like this: AbstractController::Layouts), then ruby searches
for the module of that name within the scope of the current module
wrapping the class that the include was called in.
So, for example:
module ActionController
class Base
include Rendering
Since we "include Rendering" within the scope of the Base class
object, ruby first looksup the constant Rendering, that is, looking
for a module named Rendering in the ActionController namespace, since
that is the namesapce that Base is defined in???...
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? I''m I even barking up the right
tree? Here''s the relevent code
#...
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-user...
2006 Jan 10
4
Problem creating MockController
...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 initialize
@url = UrlRewriter.new(ActionController::TestRequest.new, nil)
super
end
end
because if I just do require ''action_controller'' I get a no such file error.
Problem with this mock is that I get a recursive error:
SystemStackError: stack level too deep
d:/ru...
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
ActionController::Bas...
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 View. And, on the other hand, if I do
write that as a public method - it...
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 interfers with the inheritance chain I guess, but if I
define:
<b>rescue_from Object::ActionController::Ro...
2008 Mar 20
2
Anyone having problems with asset_host not getting set up right?
...)[RAILS_ENV]
ENV[''FACEBOOK_API_KEY''] = FACEBOOKER[''api_key'']
ENV[''FACEBOOK_SECRET_KEY''] = FACEBOOKER[''secret_key'']
ENV[''FACEBOOKER_RELATIVE_URL_ROOT''] = FACEBOOKER[''canvas_page_name'']
ActionController::Base.asset_host ||= FACEBOOKER[''callback_url'']
end
But ActionController::Base.asset_host == ""
So it never gets set -- which means stylesheets and images gon''t get pulled
in from facebook.
I am going to change it to :
ActionController::Base.asset_host...
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 "/meetings/1"
=>{:action="1",:controller=>"meetings"}
which is...
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 http://www.ruby-forum.com/.
--~--~---------~--~----~-...
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!
This isn''t very helpful. How are you guys hunt...
2006 Jun 16
0
rake spec controller test output hideus.
...quot;
"spec/controllers/home_controller_spec.rb"
"spec/controllers/links_controller_spec.rb"
"spec/controllers/user_controller_spec.rb"
.......F.
1)
ExpectationNotMetError in ''The UserController should not allow new
users without the correct fields''
ActionController::TestResponse
#<ActionController::TestResponse:0x24d6880 @body="<!DOCTYPE html
PUBLIC \"-//W3C//DTD XHTML
1.1//EN\"\n\t\"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd\">\n<html>\n<head>\n\n\t<title>Me
Ruby, You Jane</title>\n\t<meta htt...
2006 Jun 07
16
How dows RoR work?
...y 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 that? Or do
I have to use that under ActionController::Cookies? I don''t get it.
--
Posted via http://www.ruby-forum.com/.
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
...rums 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::Bas...
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
{:method=>...
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",
:status => "404 Not Found")
else
render(:file => "#{RAILS_ROOT}/public/500.html",
:status => "500 Error")
SystemNoti...
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 test_helper.rb:
ActionController::TestRequest.send(:include, CGI::QueryExtension).
Now the error message changes to:
NameError: undefined local variable or method `env_ta...