Skip to content

Commit

Permalink
Feat: add inheritance for views on custom field
Browse files Browse the repository at this point in the history
  • Loading branch information
neo87cs committed Dec 12, 2024
1 parent 452e41e commit 5e630cf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/blueprinter/helpers/base_helpers.rb
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ def object_to_hash(object, view_name:, local_options:)
result_hash = view_collection.fields_for(view_name).each_with_object({}) do |field, hash|
next if field.skip?(field.name, object, local_options)

value = field.extract(object, local_options)
value = field.extract(object, local_options.merge(view: view_name))

next if value.nil? && field.options[:exclude_if_nil]

Expand Down

0 comments on commit 5e630cf

Please sign in to comment.