Class: IndexController

Inherits:
ApplicationController show all
Defined in:
app/controllers/index_controller.rb

Instance Method Summary collapse

Methods inherited from ApplicationController

#_edition_exists, #after_sign_in_path_for, #deny_access, #expansion_exists, #fill_platforms, #game_exists, #game_maker_only, #has_query, #ignore_referral_spam, #reviewer_only, #work_exists, #xhr_only

Instance Method Details

#aboutObject


15
16
# File 'app/controllers/index_controller.rb', line 15

def about
end

#faqObject


12
13
# File 'app/controllers/index_controller.rb', line 12

def faq
end

#showObject


2
3
4
5
6
7
8
9
10
# File 'app/controllers/index_controller.rb', line 2

def show
	@search = GamesSearch.new()
	results = @search.all.order(created_at: :desc).limit(6).only(:id)
	@games = results.load
	@editions_count = @search.editions_count.total
	@expansions_count = @search.expansions_count.total
	@work_count = WorksSearch.new().works_count.total
	@user_shelves = GameShelf.user_shelves(current_user.id) if current_user
end