volunteers/app/controllers/timeline_controller.rb

12 lines
360 B
Ruby
Raw Normal View History

2023-06-03 17:09:23 +02:00
class TimelineController < ApplicationController
def index
2023-06-04 11:30:43 +02:00
@weeks = (params[:weeks] || "12").to_i
@members = Member.visible_scope.
where("leaving > ? " , Date.today).
where("arriving < ? " , Date.today.at_beginning_of_month + @weeks.weeks).
order(:arriving).
page(1).per(50)
2023-06-03 17:09:23 +02:00
end
end