need help on writing a plugin

Hey all,

I've just "script/generate plugin my_plugin" and I would like to "overload" one of my view. Say I have app/views/sessions/new.html.erb and I would like to rewrite that file without touching it using the plugin. Any idea how to do this? I would also like to do the same thing with models and controllers of my application. I couldn't find a tutorial about this so I would appreciate it if you could point me to one.

Thanks in advance

Pat

It sounds like you're looking for some of the functionality that the engines plugin provides. You can find out if it's suitable for your particular project here: http://rails-engines.org.

ActionController::Base.view_paths might be what you're looking for.

For models, you would want to push your plugin's model directory in very front of config.load_paths

However, I don't buy the idea of having same models at 2 places.