On Monday, 23 July 2012 at 7:29 AM, Weston Platter wrote:
I added content on how to extend Rails Engine models. Please feel free to review and provide feedback.
--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Documentation" group.
To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-docs/-/IJBXpYpa0skJ.
To post to this group, send email to rubyonra...@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-do...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-docs?hl=en.
--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Documentation" group.
To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-docs/-/IgoWqn2wO7QJ.
I think you may have mis-interpreted the text.The engine *is* a separate component. These modifications are inside the application and are modifying the engine's class.I would not use an engine for model extensions for a main app, given the reasons you've already cited.Rails engines *are* reloaded each request in development environment and it's not necessary to restart the server in order for changes to take effect. This seems like something worth mentioning in the guide.On Monday, 23 July 2012 at 8:30 AM, Les Nightingill wrote:
These are interesting ideas, Weston, but it's not at all clear to me that an engine is the appropriate place for model decorators. In my opinion, an engine should implement a major block of functionality (possibly re-usable) that is self-contained enough to warrant carving it out of the main app as a separate piece. If a decorator pattern makes sense, I feel that it should be within the main app. What is it that suggests using an engine for model extensions?A related question that I don't know the answer to is: are Rails engines reloaded for each request in development environment, or is it necessary to restart the server in order for changes to take effect?cheersLes
On Sunday, July 22, 2012 2:29:43 PM UTC-7, Weston Platter wrote:--I added content on how to extend Rails Engine models. Please feel free to review and provide feedback.
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Documentation" group.
To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-docs/-/IgoWqn2wO7QJ.
To post to this group, send email to rubyonrails-docs@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-docs+unsubscribe@googlegroups.com.
I would not use an engine for model extensions for a main app, given the reasons you've already cited.
To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-docs/-/VleBHY_uRy4J.
To post to this group, send email to rubyonra...@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-do...@googlegroups.com.