questionmark syntax

This commit is contained in:
Andrew Tomaka 2015-04-28 10:41:58 -04:00
parent 5c7842f37d
commit 8926bd6c05

4
app.rb
View file

@ -31,8 +31,8 @@ post '/' do
end
end
get '/bossfight/?:username' do
@username = params['username'] != '' ? params['username'] : 'mafiaman'
get '/bossfight' do
@username = params['username'] ? params['username'] : 'mafiaman'
user_raids = Raid.for_user(@username)
@first_negative = user_raids.first_negative
@soldiers_killed = user_raids.soldiers_lost_to_date(@first_negative.created_at)