A website template with lots of features, built with ruby on rails.

admin_panel_controller.rb 364B

123456789101112131415161718192021222324252627
  1. class AdminPanelController < ApplicationController
  2. layout 'admin'
  3. def index
  4. redirect_to admin_dashboard_path
  5. end
  6. def dashboard
  7. @users = User.all
  8. @posts = BlogPost.all
  9. @files = Upload.all
  10. end
  11. def posts
  12. @posts = BlogPost.all
  13. end
  14. def users
  15. @users = User.all
  16. end
  17. def files
  18. @uploads = Upload.all
  19. end
  20. end