On 3 October 2006 18:51, dirtymafia wrote:> I have a signin method in my application.rb. Currently this is being
> called by the active controller..ie, mysite.com/controlller/signin.
> For this I have to have a view signin.rhtml. This is working fine, but
> I have to have a signin view under each controller''s views. Also,
> would there be a way to call this like mysite.com/signin so that you
> don''t have to have a controller listed, and so that it can be
> controller independent.
1. Use shared partials (e.g. render :partial =>
''shared/signin'' in your view,
where partial is stored in app/views/shared/_signin.rhtml)
2. Use routes:
map.connect ''/signin'', :controller =>
''Account'', :action => ''signin''
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---