Greg Hauptmann
2006-Aug-22 20:53 UTC
[Rails] include/helper use application.rb clarification
Hi,
Can I ask a quick clarificaiton re use of "application.rb" to
propagate
items through ones application. Refer to embedded code from
"application.rb" as reference.
Is it the case that by including methods etc into "application.rb"
this
is a means of then making it available to all other applicaiton
controllers, views, helpers? Is this the case?
Does this occur for both (a) include (b) helper and (c)
require_dependency usage in application.rb?
Just trying to make sure I understand how rails works here
-----------------
require_dependency
"#{RAILS_ROOT}/vendor/plugins/active_rbac/app/helpers/rbac_helper"
require_dependency
"#{RAILS_ROOT}/vendor/plugins/active_rbac/lib/active_rbac/application_controller_mixin"
class ApplicationController < ActionController::Base
helper RbacHelper
# The application controller will give us the "current_user"
method.
include ActiveRbacMixins::ApplicationControllerMixin
end
-----------------
--
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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk
-~----------~----~----~----~------~----~------~--~---