Hello, I'm new to ROR and my first wonder is to understand how to organize my application "per module"... Imagine I want to build a web site including : - the web site by itself - a forum - a wiki - a shop I would like to avoid putting all the controllers, views and models in the same app directories, polluting the subdirs with prefixed files like wiki_*, shop_*, forum_* - All the modules must share the same resources on the app_root directory (components, config, db, doc, and the like) In fact, what I want to do is http://myapp.com/module/controller/action and not only http://myapp.com/controller/action Which would be simply related to the subdirs /app_root/app/module/controller /app_root/app/module/views /app_root/app/module/models /app_root/app/module/helpers Is it just a matter of playing with routes.rb ? Could someone show me how to do ? Thank you Note : I allways asked these question on another ror forum and tought at first that I needed was see every module as a component but I think this is not the right solution. In the above example, the components would be more 'low level' (eg. authentification component)...
on 2006-03-21 12:57
on 2006-03-21 17:58
This is exactly what Rails Engines lets you do: http://rails-engines.org - james On 3/21/06, Christophe Christophe <firstname.lastname@example.org> wrote: > the same app directories, polluting the subdirs with prefixed files like > Which would be simply related to the subdirs > > http://lists.rubyonrails.org/mailman/listinfo/rails > -- * J * ~
on 2006-03-22 00:42
Thank you James ! It took me 3 hours to setup "engines" and created a simple engine but in fact it wasn't that hard... I just wonder why "engines" is not part of ROR itself ? It seems so sensible to me