ruby on rails sub directory inside in the 'Views' main directory
- by Kum
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