lootban start
This commit is contained in:
@ -54,4 +54,16 @@ class AdminController < ApplicationController
|
||||
session.delete(:user_id)
|
||||
redirect_to root_path, notice: "Logged out!"
|
||||
end
|
||||
|
||||
def set_lootban(name)
|
||||
if Lootban.count == 0
|
||||
Lootban.create(name: name)
|
||||
else
|
||||
Lootban.first.name = name
|
||||
end
|
||||
end
|
||||
|
||||
def delete_lootban
|
||||
Lootban.delete_all
|
||||
end
|
||||
end
|
||||
|
@ -1,5 +1,6 @@
|
||||
class LeaderboardController < ApplicationController
|
||||
def index
|
||||
@players = Player.where(main_player_id: nil).order(purse: :desc)
|
||||
@lootban = Lootban.first&.name || "Nobody... yet"
|
||||
end
|
||||
end
|
||||
|
Reference in New Issue
Block a user