From within a Rails 3 Gem I''m working on, I need to get the app''s name. i.e., the value of the module that wraps the application class in application.rb. Is there some global-syle variable that contains that? #application.rb module MyAppName class Application < Rails::Application end end Thanks. Elliott G -- 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.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Rails.application.class.parent Daniel Gaytán 2010/9/19 elliottg <x@simplecircle.net>> From within a Rails 3 Gem I''m working on, I need to get the app''s > name. i.e., the value of the module that wraps the application class > in application.rb. Is there some global-syle variable that contains > that? > > #application.rb > module MyAppName > class Application < Rails::Application > end > end > > Thanks. > Elliott G > > -- > 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.gmane.org > To unsubscribe from this group, send email to > rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org<rubyonrails-talk%2Bunsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> > . > For more options, visit this group at > http://groups.google.com/group/rubyonrails-talk?hl=en. > >-- 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.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Thanks Daniel! I need to sift through Rails.application in general it seems. Elliott G On Sep 19, 11:28 pm, Daniel Gaytán <daniel.gaytan.n...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Rails.application.class.parent > > Daniel Gaytán > > 2010/9/19 elliottg <x...-+PdThUrr9bOXUBVsB0ZYTw@public.gmane.org> > > > > > From within a Rails 3 Gem I''m working on, I need to get the app''s > > name. i.e., the value of the module that wraps the application class > > in application.rb. Is there some global-syle variable that contains > > that? > > > #application.rb > > module MyAppName > > class Application < Rails::Application > > end > > end > > > Thanks. > > Elliott G > > > -- > > 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.gmane.org > > To unsubscribe from this group, send email to > > rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org<rubyonrails-talk%2Bunsubscrib e@googlegroups.com> > > . > > For more options, visit this group at > >http://groups.google.com/group/rubyonrails-talk?hl=en.-- 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.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.