Method: Elabs::Member::NotificationsController#index

Defined in:
app/controllers/elabs/member/notifications_controller.rb

#indexObject

GET /notifications



10
11
12
13
14
# File 'app/controllers/elabs/member/notifications_controller.rb', line 10

def index
  order     = params['order_by'] || self.class::DEFAULT_ORDER_FIELD
  direction = params['direction'] || 'desc'
  @notifications = Notification.for_user(current_user).order(order => direction).page(params[:page]).per(self.class::MAX_ITEMS_PER_PAGE)
end