Last active
December 19, 2015 20:09
-
-
Save aalvarado/6011560 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
before_filter :find_position, only: [:show, :destroy, :edit] | |
def destroy | |
if @position.destroy | |
flash[:success] = t('labels.success') | |
else | |
flash[:error] = t('labels.error') | |
end | |
redirect_to positions_path | |
end | |
def position_params | |
params.require(:position).permit(:id) | |
end | |
def find_position | |
@position = Position.find(position_params) | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment