Created
January 12, 2014 15:58
-
-
Save JackPott/8386397 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_action :set_project, only: [:show, :edit, :update, :destroy] | |
#snip.... | |
# GET /projects/1/edit | |
def edit | |
end | |
#snip... | |
private | |
# Use callbacks to share common setup or constraints between actions. | |
def set_project | |
@project = Project.find(params[:id]) | |
end | |
# Never trust parameters from the scary internet, only allow the white list through. | |
def project_params | |
params.require(:project).permit(:name, :designer) | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment