Reorder by life cycle
This commit is contained in:
parent
75e9630b8f
commit
15daf75c38
1 changed files with 2 additions and 2 deletions
4
vote.rb
4
vote.rb
|
|
@ -113,14 +113,14 @@ get '/votes/:id' do
|
|||
redirect '/login' unless current_user
|
||||
@vote = Vote.find_by(secure_id: params[:id])
|
||||
case @vote.state
|
||||
when "open"
|
||||
erb :votes_show_open
|
||||
when "draft"
|
||||
if @vote.users.exists?(current_user.id)
|
||||
erb :votes_edit
|
||||
else
|
||||
erb :votes_show_draft
|
||||
end
|
||||
when "open"
|
||||
erb :votes_show_open
|
||||
when "closed"
|
||||
erb :votes_show_closed
|
||||
else
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue