I’m fairly noob with rails and making my first DB driven site with it.
I’m using the scaffold generator to develop the admin side of my site
I have three sections that I want to have the administrator edit, and I
want to call these from the admin controller that has a layout with
navigation to these three sections.
When using the scaffold generator, it obviously generates the news_items
controller, and puts in the associated methods and makes the views.
What I suppose I am wanting is to have all this functionality called
from the admin controller all utilizing the admin view
class AdminController < ApplicationController
CRUD functions for news_items
CRUD functions for email
CRUD functions for users
So I hope this makes some sense, but I thought it would be smarter to
call all from the admin controller instead of dividing out each section
and having a controller for each. Is there a smarter way to put this
all in my admin controller or should I just control everything with
layouts and routes?