Class: Tasks::Accessions::Report::WorkController
- Inherits:
-
ApplicationController
- Object
- ApplicationController
- Tasks::Accessions::Report::WorkController
- Includes:
- DataControllerConfiguration::ProjectDataControllerConfiguration, TaskControllerConfiguration
- Defined in:
- app/controllers/tasks/accessions/report/work_controller.rb
Instance Method Summary collapse
Methods included from DataControllerConfiguration::ProjectDataControllerConfiguration
Methods included from TaskControllerConfiguration
Instance Method Details
#data ⇒ Object
9 10 11 12 13 14 15 16 17 18 19 20 21 |
# File 'app/controllers/tasks/accessions/report/work_controller.rb', line 9 def data @user = User.find(params[:user_id]) @records = Queries::CollectionObject::Filter.new( user_target: 'updated', user_date_start: get_date('start'), user_date_end: get_date('end'), user_id: @user.id ).all.order('collection_objects.updated_at ASC') @sessions = ::Work.sessions(@records) render :index end |
#get_date(target) ⇒ Object
23 24 25 26 27 28 29 |
# File 'app/controllers/tasks/accessions/report/work_controller.rb', line 23 def get_date(target) [ params[target]['date(1i)'], params[target]['date(2i)'], params[target]['date(3i)'], ].join('-') end |
#index ⇒ Object
GET
6 7 |
# File 'app/controllers/tasks/accessions/report/work_controller.rb', line 6 def index end |