Yes, a post on this would be very useful.


On Wed, Jan 20, 2010 at 9:52 AM, Mislav Marohnić
<mislav.maroh...@gmail.com>wrote:

> On Wed, Jan 20, 2010 at 10:48, Yehuda Katz <wyc...@gmail.com> wrote:
>
>>
>> Another option would be to move it into lib/my_lib/railtie.rb (or
>> whatever) and require it from my_lib.rb. You can then do require
>> "my_lib/railtie" if defined?(Rails), since the Rails constant will always be
>> required before your gems (check out boot.rb if you want to see how).
>>
>
> So, the bottom line is that we (users, plugin authors) are responsible that
> the Railtie subclass somehow gets executed, either automatically in plugin
> code or explicitly with Bundler :require_as.
>
> That's what I wanted to know. I guess this is all we need, since with
> Railtie we can hook into initializer and fine-tune what our plugin does at
> any specific stage of application loading.
>
> I suggest you write a post on how Railtie subclasses look like, what they
> can do and what are the options of hooking into the initializer other than
> simply appending new initialization steps to the list.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Ruby on Rails: Core" group.
> To post to this group, send email to rubyonrails-c...@googlegroups.com.
> To unsubscribe from this group, send email to
> rubyonrails-core+unsubscr...@googlegroups.com<rubyonrails-core%2bunsubscr...@googlegroups.com>
> .
> For more options, visit this group at
> http://groups.google.com/group/rubyonrails-core?hl=en.
>
>


-- 
Thanks,

Owen

Owen Dall
Barquin International
410-991-0811
--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group.
To post to this group, send email to rubyonrails-c...@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-core+unsubscr...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en.

Reply via email to