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 --~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
On Aug 15, 6:55 am, "Patrick Aljord" <patc...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Hey all, > > I''ve just "script/generatepluginmy_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 theplugin. 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 > > PatIt 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. -- James --~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
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. On 8/15/07, Patrick Aljord <patcito-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > 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 > > > >-- Cheers! - Pratik http://m.onkey.org --~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---