views:

54

answers:

2
+1  Q: 

Rails Plugins

Is it possible to include view code in a plugin, such that an app using the plugin can simply call reference the view code like it might reference one of its own partials.

Am I off track here or are there good examples of plugins which do this..

+1  A: 

You can do that with Rails Engines.

Adam Lassek
+1  A: 

You can do this with the engine stuff that's already built into Rails 2.3, I've done it with calenduh. This is supposedly vastly improved in the up and coming Rails 3.

Ryan Bigg
Does that mean rails engines will be built-in with Rails3?
jpartogi
Thanks Radar, so rails engines looks like the way to go.. its relatively new so are there any gotchas to look out for.. Can I package all the static assets (css, images etc) with the rails engine?
Dom
@jpartogi: yup@Dom: You can't package them but if you look at calenduh I've added something to install.rb that will copy them over to public.
Ryan Bigg