copy timeline here

This commit is contained in:
2023-06-18 11:23:46 +03:00
parent 818af2f5e9
commit def9e6083d
10 changed files with 126 additions and 10 deletions

View File

@ -49,6 +49,6 @@ class MembersController < ApplicationController
# Only allow a list of trusted parameters through.
def member_params
params.require(:member).permit(:name, :public, :bio , :picture,
:picture_cache , :arrived ,:left)
:picture_cache , :arriving ,:leaving)
end
end

View File

@ -0,0 +1,11 @@
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