On Sun, May 15, 2011 at 3:50 PM, Martin Wawrusch <mar...@wawrusch.com>wrote:
> Thanks a lot. I really needed some assurance that this is the right > direction. Sure, post back if you have any issues. One thing which I had some trouble with was that by default your principal application will load before the engine. This is a problem if you have, say, a model in your engine which you are intending to extend in your primary app and not the other way around. There is a way around this but just be aware. > > > On Sun, May 15, 2011 at 1:48 PM, David Kahn > <d...@structuralartistry.com>wrote: > >> >> >> On Sun, May 15, 2011 at 12:33 PM, Martin Wawrusch <mar...@wawrusch.com>wrote: >> >>> Hi guys, >>> I am rather new to the rails world and need your help in pointing me to a >>> good sample project and/or some hints how best to implement it. >>> >>> I have implemented an API section for a website of mine that deals with >>> API Key management and want to publish parts of it as a gem so that it can >>> be easily used it in other projects. This consists of controllers, views, >>> some mongoid models, some coffeescript code, some scss. In a way it is a >>> mini application with replaceable parts. >>> >>> What is the recommended way in Rails 3 to implement this in a gem so that >>> it is reusable and future proof (Rails 3.1 comes to mind). Should I look >>> into rails engines? Do you know of any samples that implement best >>> practices? >>> >> >> I just worked on a project which makes use of an engine. Although I did >> not create it I went through a decent amount of work to get it to play nice >> with the main app. It sounds to me that an engine would be the right thing >> as it handles including controllers, views, models, etc. If you google for >> rails engine I see that there are a number of results including a railscast >> which would be where I would start. >> >>> >>> Thanks >>> >>> Martin >>> >>> >>> >>> >>> -- >>> 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@googlegroups.com. >>> To unsubscribe from this group, send email to >>> rubyonrails-talk+unsubscr...@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@googlegroups.com. >> To unsubscribe from this group, send email to >> rubyonrails-talk+unsubscr...@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@googlegroups.com. > To unsubscribe from this group, send email to > rubyonrails-talk+unsubscr...@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@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.