Class: IndexController

Inherits:
ArtfullyOseController show all
Defined in:
app/controllers/index_controller.rb

Instance Method Summary collapse

Instance Method Details

#dashboardObject



18
19
20
21
22
23
# File 'app/controllers/index_controller.rb', line 18

def dashboard
  if current_user.is_in_organization?
    @events = current_user.current_organization.events.includes(:shows, :venue).order('updated_at DESC').limit(4)
    @recent_actions = Action.recent(current_user.current_organization).where('import_id is null').page(params[:page]).per_page(10)
  end
end

#indexObject



5
6
7
# File 'app/controllers/index_controller.rb', line 5

def index
  redirect_to admin_root_path if admin_signed_in?
end

#login_successObject



9
10
11
# File 'app/controllers/index_controller.rb', line 9

def 
  redirect_to root_path
end

#recent_activityObject



13
14
15
16
# File 'app/controllers/index_controller.rb', line 13

def recent_activity
  @recent_actions = Action.recent(current_user.current_organization).where('import_id is null').page(params[:page]).per_page(10)
  render 'index/_recent_activity', :layout => false
end