residency/app/controllers/timeline_controller.rb
2023-06-18 11:23:46 +03:00

12 lines
360 B
Ruby

class TimelineController < ApplicationController
def index
@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)
end
end