Class: Houston::Roadmaps::RoadmapMilestonesController
Instance Method Summary
collapse
#create, #edit, #history, #new, #show
Instance Method Details
#update ⇒ Object
14
15
16
17
18
19
20
21
22
23
24
25
|
# File 'app/controllers/houston/roadmaps/roadmap_milestones_controller.rb', line 14
def update
authorize! :update, @roadmap
@roadmap.commits.create!(
user: current_user,
message: params[:message],
milestone_changes: params.fetch(:roadmap, {}).values)
head :ok
rescue ActiveRecord::RecordInvalid
render json: $!.record.errors, status: 422
end
|