Add app/controllers/home_controller.rb
This commit is contained in:
parent
d9a97f9e1a
commit
0d35eeeb28
1 changed files with 14 additions and 0 deletions
14
app/controllers/home_controller.rb
Normal file
14
app/controllers/home_controller.rb
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
# replace index at the bottom with this code
|
||||
|
||||
def index
|
||||
@homepage = Homepage.new(@current_user)
|
||||
@random_user = User.unscoped.order(Arel.sql("RAND()")).first
|
||||
unless @homepage.logged_in?
|
||||
@user_count, @work_count, @fandom_count = @homepage.rounded_counts
|
||||
end
|
||||
|
||||
@hide_dashboard = true
|
||||
render action: 'index', layout: 'application'
|
||||
end
|
||||
end
|
||||
|
||||
Loading…
Reference in a new issue