Engines (http://rails-engines.org/) are typically the way to go to
share complete MVC slices among applications.
--
Building an e-commerce site with Rails?
http://agilewebdevelopment.com/rails-ecommerce
Meet up at RailsConf:
http://railsconf2007.conferencemeetup.com/
On Apr 13, 2007, at 3:18 PM, Stephane wrote:
>
> Hi all,
>
> I would like to create a ''piece'' of application, a poll
system, and
> want
> to make it as a plugin.
>
> I found many information about plugins, most about mixin and extending
> core, but not so much for making plugin with controllers and views.
>
> First, Do I think the wrong way with plugin ?
>
> Then I found the following on techno weenie:
>
> for your model :
>
> models_path = File.join(directory, ''app'',
''models'')
> $LOAD_PATH << models_path
> Dependencies.load_paths << models_path
>
> for the controllers it''s quite the same:
>
> controller_path = File.join(directory, ''app'',
''controllers'')
> $LOAD_PATH << controller_path
> Dependencies.load_paths << controller_path
> config.controller_paths << controller_path
>
> And finally to include views, you should integrate in your controller:
>
> self.template_root = File.join(File.dirname(__FILE__),
''..'',
> ''views'')
>
> Is it a good practise ? Is it the good way to share a piece of
> application?
>
> And other questions come to my mind:
>
> * How standardize the way of communicate between application and
> plugin ?
> * In the same topic, I have 2 parts in the plugin, one for admin
> and
> one for front user, How should I do to easily provide a plugin knowing
> every application have a different way to authorize or authenticate
> users?
>
> Please feel free to share any knowledge on these subjects :)
>
> --
> Stephane
> http://www.rubynaut.net
>
>
> >
--~--~---------~--~----~------------~-------~--~----~
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?hl=en
-~----------~----~----~----~------~----~------~--~---