Skip to content
Snippets Groups Projects
Commit 606701ad authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets
Browse files

Look for milestone by iid in milestone controller

parent 625fb2f2
No related branches found
No related tags found
1 merge request!5081fixed command to update init script
Loading
Loading
@@ -81,7 +81,7 @@ class Projects::MilestonesController < Projects::ApplicationController
protected
 
def milestone
@milestone ||= @project.milestones.find(params[:id])
@milestone ||= @project.milestones.find_by_iid!(params[:id])
end
 
def authorize_admin_milestone!
Loading
Loading
Loading
Loading
@@ -25,6 +25,7 @@ describe Milestone do
end
 
describe "Validation" do
before { subject.stub(set_iid: false) }
it { should validate_presence_of(:title) }
it { should validate_presence_of(:project) }
end
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment