Make Milestones general, and not specific to Budget Investments
Generalize the Budget::Investment::Milestone model to a polymorphic Milestone model so it can be used for entities other than Budget::Investment.
This commit is contained in:
@@ -7,8 +7,8 @@ module ActionDispatch::Routing::UrlFor
|
||||
case resource.class.name
|
||||
when "Budget::Investment"
|
||||
[resource.budget, resource]
|
||||
when "Budget::Investment::Milestone"
|
||||
[resource.investment.budget, resource.investment, resource]
|
||||
when "Milestone"
|
||||
[resource.milestoneable.budget, resource.milestoneable, resource]
|
||||
when "Legislation::Annotation"
|
||||
[resource.draft_version.process, resource.draft_version, resource]
|
||||
when "Legislation::Proposal", "Legislation::Question", "Legislation::DraftVersion"
|
||||
|
||||
Reference in New Issue
Block a user