Created
May 10, 2011 06:28
-
-
Save scottharvey/964002 to your computer and use it in GitHub Desktop.
This file contains 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
def update | |
milestone = @project.milestones.find(params[:id]) | |
params[:milestone]['invoice_on_completion'] = "0" unless params[:milestone]['invoice_on_completion'] | |
if milestone.update_attributes(params[:milestone]) | |
respond_to do |format| | |
format.js { render :json => milestone } | |
end | |
else | |
respond_to do |format| | |
format.js { render :json => milestone.errors.full_messages, :status => :bad_request } | |
end | |
end | |
end |
mwotton
commented
May 10, 2011
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment