Displaying 20 results from an estimated 6000 matches similar to: "multiple modules defining same method included into a class"
2012 Sep 21
2
in Rails, what is the main (global) scope called?
For example, you see files called
rails/actionpack/lib/action_controller/base.rb
which adds methods and such to the open module ActionController. What
scope is ActionController in? Is it just called the global scope?
Obviously, there is namespace resolution lookup. And a good example of
this is in the Base class of the same file. It references one module
like this: AbstractController::Layouts
2013 Jul 10
4
Decoupling of ActionPack
Hello!
Are the plans of splitting ActionPack for several gems (AbstractController,
ActionView, etc)? Like https://github.com/rails/rails/pull/7356 ...
I.e. I know gems that are needed AbstractController only... And they are
forced to require the whole ActionPack...
Thanx.
--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group.
To
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 May 25
1
warning: toplevel constant SomeController referenced by Admin::SomeController
This issue has been discussed before (http://www.ruby-forum.com/topic/
125392) and after spending a while debugging through this, I still
don''t have a solution. Lets try again?
I have two controllers, SomeController and Admin::SomeController. When
SomeController is loaded first (which happens under spork, found out
by editing ActiveSupport::AbstractController) I get warning: toplevel
2012 Mar 29
2
Rails 3.2 and Streaming using response_body
I am working on a streaming download (CSV) from Rails 3.2 and am coming up
against an issue of the initial page request taking a long time. The
following controller code illustrates my issue:
self.response_body = Enumerator.new do |y|
10_000_000.times do
y << "Hello World"
end
end
With the above, the response does seem like its streaming
2010 Jul 04
2
Rendering a different format in the implementation of a renderer
Yehuda has a nice article on implementing a custom renderer for PDF at
http://www.engineyard.com/blog/2010/render-options-in-rails-3/
I''ve tried to follow the example and I''m not sure I see how to get it to
work. If I understand things correctly, the format(s) usable in this
render call
respond_with(@resource) do |format|
format.xyz { render :xyz => ... }
end
2007 Sep 18
10
Routes
hi all,
I want to move some routing tasks out of the router and into the
controller. The goal is to make Merb feel less like mod_rewrite and
give the user more control at the controller. The new Router is
simple: it takes the path_info (not the whole request) then outputs a
controller class and some parameters from the path matching. The rest
of the routing would be done at the controller level.
2010 Sep 27
3
streaming response body to client?
So I''d like to stream my response body to the client.
At least under Rails2, it looks like you can pass a Proc to render
:text, to do that.
I am in a Rails2 app right now, but will upgrade to Rails3 sometime in
the next couple months, so don''t want to set myself up for failure.
Anyone know the status of streaming responses in Rails3? Is it
possible? Is there a different API
2007 Aug 29
11
Non-Erubis Templates
Trunk Issue: Because of the use of ''autoload'', template handlers other
than Erubis are not loaded automatically (Haml, XMLBuilder). Either
this should be fixed, or the documentation should be updated to
instruct people how to use non-Erb template engines.
Apparently the solution is to do something like this in merb_init.rb:
::Merb::AbstractController.register_engine
2010 Jul 27
13
3.0.0rc ActionController::RoutingError No route matches
Have been developing on 3.0.0beta4 and just updated to 3.0.0.rc.
When I try to link_to() a User object that previously had worked, I
get the following:
ActionView::Template::Error (No route matches
{:action=>"destroy", :controller=>"games", :id=>#<User ..... >
Yet I have in my routes.rb file has resources :users and my "rake
routes" shows:
2011 May 17
1
rails render_to_string problem
Hi
I`m trying to test my controller with rspec and always get an error.
The error is in the render_to_string method call (without it test
works fine). So could u please help me with that?
users_controller.rb:
def update
@user.update_attributes!(params[:user])
redirect_to @user, :status => 202, :text =>
render_to_string(:partial => "users/show", :type =>
2009 Oct 31
3
1.9 Compat and merging mail gem into ActionMailer
Hi all of both RoR Core and TMail.
You may know me better as the maintainer of TMail.
However, TMail has been a bit difficult to get working with Ruby 1.9,
so in the light of that, I sat down over the past few months and wrote
myself an all encompasing mail gem. Mail passes all of its hundreds
of specs equally well in Ruby 1.8.6, 1.8.7 and 1.9.1. Mail reads
every email in the TMail test suite
2010 Apr 22
1
Thunderbird namespace handling
Hello,
I've noticed that Thunderbird (3.0.3) seems to wrongly "repeat" the namespace
prefix when selecting the top level maildir of a namesapce.
It doesn't occur if "list=yes" and TB has no clue about the namespace prefix.
But it seems to happen only when TB is aware of the namespace prefix, either
via the NAMESPACE command (so in "hidden=no" setups) or via
2006 Mar 21
4
render :action => ''list''
does anybody know what the hell "render :action => ''list''" means???
is "render" a method? is :action a parameter?
thanks a lot.
--
Posted via http://www.ruby-forum.com/.
2008 Oct 10
17
authenticity_token sent, still InvalidAuthenticityToken
Hi!
To send the authenticity token from flex back to the server, I followed
this:
http://blog.dt.org/index.php/2008/06/rails-2-flex-3-and-form-authenticity-tokens/
I have two controllers in my rails app. The method described in the link
above works with the actions in one controller, but does not work with
the other.
The controller which does not work has just one action which performs a
file
2010 Jun 26
0
erase_redirect_results in Rails 3.0
This method is non-existent in Rails 3.0. It is required for
responds_to_parent.
I try commenting it out but would get
AbstractController::DoubleRenderError
Thank you,
Sharkie
--
Posted via http://www.ruby-forum.com/.
--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to
2010 Nov 07
1
Strange authlogic logout behavior
I am using authlogic for my application''s authentication. If I decide
to login with an account and then immediately logout, I get an error.
Unknown action
The action ''show'' could not be found for UserSessionsController
The server log in development says:
Started GET "/user_session" for 127.0.0.1 at Sun Nov 07 13:28:31 -0800
2010
2012 Sep 28
0
Overriding class_attribute writers and order of super/extend C.M./included block eval in ActiveSupport::Concern
I have:
module MySpike
extend ActiveSupport::Concern
included do
class_attribute :foobar, instance_writer: true
end
end
But, I want to be able to override the class attribute writer and/or
instance writer method to do something when the attribute is set via
self.foobar = true before or after calling super to set the attribute.
Unfortunately, I can''t find a clean way
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/.
2006 Mar 31
3
Need to use a method without the layout
I need to use a method (called by one of my controllers) without using
the layout. All the other methods in the controller need to use this
layout except for thismethod (becausae it''s called by an Ajax script). I
know how to use :layout=>layout_name when calling a method from another
method, but nothing is calling this.
The layout needs to be removed in the method itself or I need