Module: Auth::Concerns::ActivityControllerConcern
- Extended by:
- ActiveSupport::Concern
- Defined in:
- app/controllers/auth/concerns/activity_controller_concern.rb
Instance Method Summary collapse
- #get_activities ⇒ Object
-
#model ⇒ Object
gives the model class from the underlying controller.
- #permitted_params ⇒ Object
Instance Method Details
#get_activities ⇒ Object
14 15 16 17 18 |
# File 'app/controllers/auth/concerns/activity_controller_concern.rb', line 14 def get_activities filt_test = permitted_params activities_hash = model.get_in_range(filt_test) respond_with activities_hash end |
#model ⇒ Object
gives the model class from the underlying controller
24 25 26 |
# File 'app/controllers/auth/concerns/activity_controller_concern.rb', line 24 def model Object.const_get(controller_name.classify) end |
#permitted_params ⇒ Object
28 29 30 |
# File 'app/controllers/auth/concerns/activity_controller_concern.rb', line 28 def permitted_params params.permit(:user_id, range: [:from, :to], only: []) end |