Skip to content

Commit

Permalink
removes unnecessary condition and flash
Browse files Browse the repository at this point in the history
  • Loading branch information
voodoorai2000 committed Sep 28, 2015
1 parent 3dfa00b commit 24a60bd
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions app/controllers/verification/letter_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,8 @@ def new

def create
@letter = Verification::Letter.new(user: current_user)
if @letter.save
redirect_to edit_letter_path
else
flash.now.alert = t('verification.letter.create.alert.failure')
render :new
end
@letter.save!
redirect_to edit_letter_path
end

def edit
Expand Down

0 comments on commit 24a60bd

Please sign in to comment.