Class: Overule::ActivitiesController

Inherits:
ApplicationController show all
Defined in:
app/controllers/overule/activities_controller.rb

Instance Method Summary collapse

Instance Method Details

#indexObject



3
4
5
6
7
8
# File 'app/controllers/overule/activities_controller.rb', line 3

def index
  scope        = RuleActivity.recent
  scope        = scope.where(rule_id: params[:rule_id]) if params[:rule_id].present?
  @rule_filter = Rule.find_by(id: params[:rule_id]) if params[:rule_id].present?
  @activities  = scope.limit(200)
end