Skip to content

Commit

Permalink
Handle missing attr on decorated object in TableDisplay::Column
Browse files Browse the repository at this point in the history
refs #897
  • Loading branch information
amaierhofer committed Feb 11, 2020
1 parent 2159f57 commit 4089f97
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion app/helpers/table_displays/column.rb
Expand Up @@ -30,7 +30,8 @@ def render
end

def format_attr(target, attr)
template.format_attr(target, attr) if target.respond_to?(attr)
model = target.is_a?(ApplicationDecorator) ? target.model : target
template.format_attr(target, attr) if model.respond_to?(attr)
end

def header
Expand Down

0 comments on commit 4089f97

Please sign in to comment.