retrospring/app/controllers/group_controller.rb

16 lines
486 B
Ruby
Raw Normal View History

2015-01-13 13:23:12 +01:00
class GroupController < ApplicationController
2020-04-19 01:45:50 +02:00
before_action :authenticate_user!
2015-01-13 13:23:12 +01:00
def index
2015-01-17 19:07:31 +01:00
@group = current_user.groups.find_by_name!(params[:group_name])
@timeline = @group.cursored_timeline(last_id: params[:last_id])
@timeline_last_id = @timeline.map(&:id).min
@more_data_available = !@group.cursored_timeline(last_id: @timeline_last_id, size: 1).count.zero?
respond_to do |format|
format.html
2020-05-09 04:39:09 +02:00
format.js { render layout: false }
end
2015-01-13 13:23:12 +01:00
end
2015-01-13 23:21:16 +01:00
end