Skip to content

Commit

Permalink
Merge pull request #204 from trevorrjohn/view-state
Browse files Browse the repository at this point in the history
Setting view causes state change on default view
  • Loading branch information
mcclayton authored Mar 16, 2020
2 parents 224c37c + 4221123 commit bb07d6f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion lib/blueprinter/view_collection.rb
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ def add_to_ordered_fields(ordered_fields, definition, fields, view_name_filter =
end

def merge_fields(source_fields, included_fields)
source_fields.merge! included_fields
source_fields.merge included_fields
end
end
end
1 change: 1 addition & 0 deletions spec/integrations/shared/base_render_examples.rb
Original file line number Diff line number Diff line change
Expand Up @@ -409,6 +409,7 @@ def self.unless_method(_field_name, _object, _options)
expect(blueprint.render(obj, view: :normal)).to eq(normal)
expect(blueprint.render(obj, view: :extended)).to eq(ext)
expect(blueprint.render(obj, view: :special)).to eq(special)
expect(blueprint.render(obj)).to eq(no_view)
end
end

Expand Down

0 comments on commit bb07d6f

Please sign in to comment.