Merge pull request #5106 from consul/fix_budget_background_image
Render background images with brackets in their names
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
<% if budget.image.present? %>
|
||||
<div class="budget-header with-background-image"
|
||||
style="background-image: url(<%= polymorphic_path(budget.image.variant(:large)) %>);">
|
||||
style="<%= attached_background_css polymorphic_path(budget.image.variant(:large)) %>">
|
||||
<% else %>
|
||||
<div class="budget-header">
|
||||
<% end %>
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
class Budgets::BudgetComponent < ApplicationComponent
|
||||
attr_reader :budget
|
||||
delegate :attached_background_css, to: :helpers
|
||||
|
||||
def initialize(budget)
|
||||
@budget = budget
|
||||
|
||||
Reference in New Issue
Block a user