mac
2010-Jul-20 13:21 UTC
do I need to seperate admin and user area phsically in my file structure ??
hii guys!! m new to rails. I am about to create a simple CMS application . Do i need to put my files in seperate folders ?? If doing so how to follow rails convention. I am using scaffold to create my admin end . do I need to change my style...I mean do I need to write them on my own ??. Let me explain my problem with example suppose I need a table called contain & I use scaffold to generate it table name: Content now all files called content_controller.rb , a view folder called contents & a model called content.rb The above description is completely fine and good for admin. know I need user end ....what I am doing is creating a controller name user and writing action in it . User dont have any model assosiated with it . I will be specify in controller which model to use . DO YOU GUYS HAVE BETTER APPROCH THEN WHAT I FOLLOW ..... ??? THANKS -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Fernando Perez
2010-Jul-20 14:39 UTC
Re: do I need to seperate admin and user area phsically in my file structure ??
I prefer to have separate admin controllers with at the top a before_filter :require_admin to be safe. -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.