Class: LeanCms::DashboardController

Inherits:
ApplicationController show all
Defined in:
app/controllers/lean_cms/dashboard_controller.rb

Instance Method Summary collapse

Instance Method Details

#indexObject



5
6
7
8
9
10
11
# File 'app/controllers/lean_cms/dashboard_controller.rb', line 5

def index
  @recent_posts = LeanCms::Post.recent.limit(5)
  @recent_submissions = LeanCms::FormSubmission.recent.limit(10)
  @unread_submissions_count = LeanCms::FormSubmission.unread.count
  @draft_posts_count = LeanCms::Post.draft.count
  @published_posts_count = LeanCms::Post.published.count
end