shaokun.wu-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
2008-Jun-13 04:53 UTC
How to pack models, controllers into a Plugin
We have been using rails to build a application platform for years. Because some of projects are completely different, we have to branch our trunk and make changes in branch. But among trunk and branches, they do have similar models and controllers, the platform core. So, we are thinking about extracting these core into a plugin, which may contains models, controllers and maybe views (but I would like to put views in specific project''s /app/views, because of the layout are in project). And if needed, we could override models or controllers by creating a same class in /app/models or /app/controllers. Most of the article in Google are talking about how to extend model in plugin. Is that a good idea to pack part of your project into a plugin?? Right now, I have problem like loading order, inherence issue. Has anyone done works like these? --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
On Jun 12, 2008, at 9:53 PM, shaokun.wu-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org wrote:> Is that a good idea to pack part of your project into a > plugin??It makes a lot of sense to me. Easier to share among projects, and you can manage versioning of the plugin independently of the projects. I''ve already started to move the pieces I know I''ll be reusing into plugins. For refc material, I found The Rails Way useful, but the peepcode PDF was much more detailed, so get that for sure. Then download a few of the well known plugins to compare as examples too. https://peepcode.com/products/rails-2-plugin-patterns -- gw --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---