[Engines Guide] extending controllers and models

180 views
Skip to first unread message

Weston Platter

unread,
Jul 12, 2012, 5:52:30 PM7/12/12
to rubyonra...@googlegroups.com
Asked this question on Rails core google group. Got some answers, nothing definitive. (see response). Anyone working on it? If not, I'll provide an initial draft.

--------

Is there a "Rails Way" way for extending models and controllers of rails engines?

The docs have TODO notes with no content for extending controllers and models

If there's preferred method, I would love to use it and I'll update the docs.

Ryan Bigg

unread,
Jul 22, 2012, 6:11:14 PM7/22/12
to rubyonra...@googlegroups.com
I believe that you're on the right track with your model decorator idea and the same can be applied to controllers as well. Do that.
--
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/-/bmvLRdNIYqsJ.
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.

Weston Platter

unread,
Jul 24, 2012, 6:14:42 AM7/24/12
to rubyonra...@googlegroups.com
Before I start writing, I think it would be edit the http://edgeguides.rubyonrails.org/engines.html#improving-engine-functionality to describe extending Rails Engines by explaining,
  • how to add methods to existing engine models/controllers
  • how to override methods of existing engine models/controllers
  • how to use ActiveSupport::Concern to structure Engine models/controllers
 Concur?

Gosh, I feel like this is growing into a book.


On Sunday, July 22, 2012 6:11:14 PM UTC-4, Ryan Bigg wrote:
I believe that you're on the right track with your model decorator idea and the same can be applied to controllers as well. Do that.

On Friday, 13 July 2012 at 7:52 AM, Weston Platter wrote:

Asked this question on Rails core google group. Got some answers, nothing definitive. (see response). Anyone working on it? If not, I'll provide an initial draft.

--------

Is there a "Rails Way" way for extending models and controllers of rails engines?

The docs have TODO notes with no content for extending controllers and models

If there's preferred method, I would love to use it and I'll update the docs.

--
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/-/bmvLRdNIYqsJ.
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.

Ryan Bigg

unread,
Jul 25, 2012, 2:47:31 AM7/25/12
to rubyonra...@googlegroups.com
Yes, I agree with these things.

A book about engines has crossed my mind more than once :)
To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-docs/-/j3mMojXIG9cJ.
To post to this group, send email to rubyonra...@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-do...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages