Class: Georgia::DashboardController

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

Instance Method Summary collapse

Methods inherited from ApplicationController

#current_ability, #current_locale

Instance Method Details

#showObject



4
5
6
7
8
9
10
11
12
13
# File 'app/controllers/georgia/dashboard_controller.rb', line 4

def show
  if can?(:approve, Georgia::Revision) or can?(:review, Georgia::Revision)
    @awaiting_revisions = Georgia::Revision.reviews.select{|r| r.revisionable.present?}
  end
  if defined? GeorgiaMailer::Message
    if can?(:index, GeorgiaMailer::Message)
      @messages = GeorgiaMailer::Message.ham.latest.limit(5).decorate
    end
  end
end