You can do most things with the plugin/gem architecture build into
Rails. The only thing I have found is that initialization order and
load_path precedence may be different than normal plugins.
With the normal system the applicaiton''s views take precedence over
views in an engine plugin or gem. With an application plugin system
(I call mine "add-ons" to differentiate it from the Rails system), you
may want to reverse this.
Right now I''ve just built my first "add-on" to the Kete app:
http://github.com/kete/kete_translatable_content/
The rails/init.rb file is where most of the example code you may want
is. Notice that I add to a set of extensions blocks to run from
within the Kete application after the initialization process has
completed to reopen classes to extend their functionality (other
classes are simply reopened in the config.to_prepare block). This
ties in on line 108 of the application''s environment.rb file:
http://github.com/kete/kete/blob/enhancement_269_refactoring_for_adds_on/config/environment.rb
Hope this helps,
Walter
On Thu, May 20, 2010 at 2:52 AM, Joshua Martin
<josmar52789-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
wrote:> Does anyone have any suggestions about building a plugin architecture for a
> Rails application?
> This would be different from the Rails plugin architecture; this would be
> plugins for my Rails application in particular (i.e. like Firefox
> extensions, or OpenOffice extensions)
>
--
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.