Skip to content

Commit

Permalink
Merge pull request #8163 from delphaber/update_field_container_helper
Browse files Browse the repository at this point in the history
Admin field_container now supports options like content_tag does
  • Loading branch information
damianlegawiec committed Jul 24, 2017
2 parents e8f7948 + 67f8e5d commit 2fcde7e
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion backend/app/helpers/spree/admin/base_helper.rb
Expand Up @@ -21,7 +21,10 @@ def field_container(model, method, options = {}, &block)
if error_message_on(model, method).present?
css_classes << 'withError'
end
content_tag(:div, capture(&block), class: css_classes.join(' '), id: "#{model}_#{method}_field")
content_tag(
:div, capture(&block),
options.merge(class: css_classes.join(' '), id: "#{model}_#{method}_field")
)
end

def error_message_on(object, method, options = {})
Expand Down

0 comments on commit 2fcde7e

Please sign in to comment.