ruby on rails sub directory inside in the 'Views' main directory

Posted by Kum on Stack Overflow See other posts from Stack Overflow or by Kum
Published on 2011-01-12T14:02:39Z Indexed on 2011/01/12 14:53 UTC
Read the original article Hit count: 160

Filed under:

Hello,

am a newbie in ruby on rails and am stuck with a simple problem of routing.

I have my controller 'sub' and the 'Views' folder containing the add,edit,new erb files.

In my routes file, i have 'map.resources :subs'.

Until now, everything is fine.

Problem: I moved the add,edit,new erb files into a subfolder called 'admin' inside the 'Views' main directory. I have no idea how to call those erb files from that 'admin' subdir.

By default, it is looking for /app/views/subs/index.html.erb, and i want it to look in /app/views/subs/admin/index.html.erb

Please can anyone tell me how to do this.

Many many thanks

© Stack Overflow or respective owner

Related posts about ruby-on-rails