Displaying 11 results from an estimated 11 matches for "abstractcontrol".
2012 Sep 18
4
multiple modules defining same method included into a class
...can be made immutable,
effectively preventing them from being reopened by freezing the module
object. Frozen modules raise RuntimeErrors when methods are defined,
or variables manipulated, in their 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 c...
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: C...
2012 Sep 21
2
in Rails, what is the main (global) scope called?
...ler/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 and another module like this:
Rendering. One uses the :: namespace resolution operator, because
Layouts module is not within the scope that class Base is, which is
module ActionController scope, so it has to reference
AbstractController which must be in the GLOBAL scope in order for ru...
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.
2011 May 25
1
warning: toplevel constant SomeController referenced by Admin::SomeController
...-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
constant SomeController referenced by Admin::SomeController and the
second controller is not loaded. The first controller is polluting
something for the namespaced controller.
I have a rather large project where this happens, so I can''t post it.
But I have a 10...
2010 Jan 18
0
rails 3.0: ActionController::Base render()
...s 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 defined or included.
Now, presumably it comes from AbstractController::Rendering, but I''m
really missing how it gets included.
Thanks,
Artem.
--
You received this message because you are subscribed to the Google Groups "Ruby on Rails:...
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
2012 Sep 28
0
Overriding class_attribute writers and order of super/extend C.M./included block eval in ActiveSupport::Concern
...nce_variable_defined?("@_included_block")
And there are classes like this that only benefit from the dependency
handling and included block class_eval part of Concern that maybe could
benefit from that being split up somehow?:
actionpack/lib/abstract_controller/asset_paths.rb:
module AbstractController
module AssetPaths #:nodoc:
extend ActiveSupport::Concern
included do
config_accessor :asset_host, :asset_path, :assets_dir,
:javascripts_dir,
:stylesheets_dir, :default_asset_host_protocol, :relative_url_root
end
end
end
Sorry if this is an uninformed way of look...
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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.g...
2010 Nov 07
1
Strange authlogic logout behavior
...ecide
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
AbstractController::ActionNotFound (The action ''show'' could not be found
for UserSessionsController):
Rendered
/usr/lib/ruby/gems/1.8/gems/actionpack-3.0.1/lib/action_dispatch/middleware/templates/rescues/unknown_action.erb
within rescues/layout (0.9ms)
Now if I login and the click on some ot...
2007 Aug 29
11
Non-Erubis Templates
...9;', 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 ::Merb::Template::Haml, %w[ haml ]
So the question is:
* Is this the permanent situation for the future?
* Can I update the docs to reflect this requirement?
Geoffrey Grosenbach
http://peepcode.com