Use Bootstrap badge
This commit is contained in:
parent
d87d191cc9
commit
134ebec01f
5 changed files with 11 additions and 36 deletions
12
vedia.rb
12
vedia.rb
|
|
@ -76,9 +76,7 @@ enable :sessions
|
|||
MajorityJudgment.values = settings.values
|
||||
|
||||
get '/' do
|
||||
require_login
|
||||
@votes = Vote.all
|
||||
erb :home
|
||||
redirect '/votes'
|
||||
end
|
||||
|
||||
get '/style.css' do
|
||||
|
|
@ -266,12 +264,18 @@ post '/admin/votes/:id/delete' do
|
|||
redirect '/admin'
|
||||
end
|
||||
|
||||
get '/votes' do
|
||||
require_login
|
||||
@votes = Vote.all
|
||||
erb :votes
|
||||
end
|
||||
|
||||
get '/votes/new' do
|
||||
require_login
|
||||
erb :votes_new
|
||||
end
|
||||
|
||||
post '/votes' do
|
||||
post '/votes/new' do
|
||||
require_login
|
||||
@vote = Vote.create(secure_id: SecureRandom.hex(8),
|
||||
title: params[:title],
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue