[Rails] Rails 3: Engines or/and Railties. How to use them?
Howdy all,
I have spent a couple of days trying to figure out how to put
different pieces of our (quite large) app into components.
The idea was to use Rails 3 Engines/Railties and place them in /lib.
Each would have its own [app/views, app/helpers, app/models and app/
controllers]
We also needed an ability for those components to override views/
helpers/controllers in the parent "container app".
No luck there. Perhaps this snippet illustrates better what I was
trying to do:
http://pastie.org/1180038
Is it what engines/railties are for?
And if not, how can I "componentize" some of the partials we have?
Our app needs certain pieces present/removed depending on which
installation we do. Right now we have a bunch of if/elses that depend
on configuration, and it looks a bit ugly, so I wanted to take some
partials+controllers+models and move them into lib/xxx and then by
including/excluding a single "require lib/xxx" I was planning to
enable/disable them.
Is it possible?
Thank you
--
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+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home