Retrospring/app/controllers/static_controller.rb

46 lines
944 B
Ruby
Raw Normal View History

# frozen_string_literal: true
2014-08-01 02:47:25 -07:00
class StaticController < ApplicationController
def index
if user_signed_in?
@timeline = current_user.cursored_timeline(last_id: params[:last_id])
@timeline_last_id = @timeline.map(&:id).min
@more_data_available = !current_user.cursored_timeline(last_id: @timeline_last_id, size: 1).count.zero?
respond_to do |format|
format.html
2020-05-08 19:39:09 -07:00
format.js { render layout: false }
end
else
return render 'static/front'
end
2014-08-01 02:47:25 -07:00
end
def about
2021-10-03 11:40:25 -07:00
@users = User
.where.not(confirmed_at: nil)
2021-10-03 11:40:25 -07:00
.where(permanently_banned: false)
.where(banned_until: nil)
.where('answered_count > 0')
.where('asked_count > 0')
.count
@questions = Question.count
@answers = Answer.count
@comments = Comment.count
@smiles = Smile.count + CommentSmile.count
2014-08-01 02:47:25 -07:00
end
2015-01-07 12:30:52 -08:00
def faq
end
2015-01-16 13:36:39 -08:00
def privacy_policy
end
2015-01-16 14:16:28 -08:00
def terms
end
2014-08-01 02:47:25 -07:00
end