Note that we're changing the component so it uses `polymorphic_path`; that way we don't have to pass the `@budget` variable to the component. We could also use `budget_investment_path investment.budget, investment` instead.
8 lines
214 B
Ruby
8 lines
214 B
Ruby
class Budgets::Executions::InvestmentsComponent < ApplicationComponent
|
|
attr_reader :investments_by_heading
|
|
|
|
def initialize(investments_by_heading)
|
|
@investments_by_heading = investments_by_heading
|
|
end
|
|
end
|