« Return to Thread: Change default view path for an ActionController

Re: Change default view path for an ActionController

by mike-609 :: Rate this Message:

Reply to Author | View in Thread

i would like to change the view path via a param

On Thu, Jul 9, 2009 at 3:10 PM, Älphä Blüë <rails-mailing-list@...> wrote:

mike wrote:
> Hello all,
>
> i would like to change the default view path for one of my controllers.
> Like
> StudentsController should use templates located in views/persons instead
> views/students. Is that possible?
>
> Greetings, Mike

Go to your routes file in config and do something similar:

map.persons '/persons', :controller => 'students', :action => 'index'

--
Posted via http://www.ruby-forum.com/.




--~--~---------~--~----~------------~-------~--~----~
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@...
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@...
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

 « Return to Thread: Change default view path for an ActionController