Simplify rendering a banner
Now the banner component accepts either a banner or a section and loads the banner if it's a section, so we don't have to add the `@banners` variable in several controllers.
This commit is contained in:
@@ -17,7 +17,6 @@ class BudgetsController < ApplicationController
|
||||
def index
|
||||
@finished_budgets = @budgets.finished.order(created_at: :desc)
|
||||
@budgets_coordinates = current_budget_map_locations
|
||||
@banners = Banner.in_section("budgets").with_active
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
Reference in New Issue
Block a user