Skip to content

Commit

Permalink
Hey look, it passes
Browse files Browse the repository at this point in the history
  • Loading branch information
bf4 committed Dec 12, 2016
1 parent f219495 commit bba724c
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion lib/active_model/serializer/concerns/attributes.rb
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ def _attributes
end

# @api private
# maps attribute value to explict key name
# maps attribute value to explicit key name
# @see Serializer::attribute
# @see FragmentCache#fragment_serializer
def _attributes_keys
Expand Down
2 changes: 1 addition & 1 deletion lib/active_model_serializers/model.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ class Model
# Configuration to avoid a breaking change with older versions of this class which lacked defined attributes.
# Previous behavior was: 1) initialized attributes were the
class_attribute :attributes_are_always_the_initialization_data, instance_writer: false, instance_reader: false
self.attributes_are_always_the_initialization_data = true
self.attributes_are_always_the_initialization_data = false # remove this commit, just for demonstration
module AttributesAreAlwaysTheInitializationData
def initialize(attributes = {})
@initialized_attributes = attributes && attributes.symbolize_keys
Expand Down
4 changes: 2 additions & 2 deletions test/action_controller/json_api/errors_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ def test_active_model_with_multiple_errors
{ source: { pointer: '/data/attributes/id' }, detail: 'must be a uuid' }
]
}.to_json
assert_equal json_reponse_body.to_json, expected_errors_object
assert_equal json_response_body.to_json, expected_errors_object
end

def json_reponse_body
def json_response_body
JSON.load(@response.body)
end

Expand Down
2 changes: 1 addition & 1 deletion test/action_controller/serialization_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -456,7 +456,7 @@ def use_adapter?
end
end

def test_render_event_is_emmited
def test_render_event_is_emitted
subscriber = ::ActiveSupport::Notifications.subscribe('render.active_model_serializers') do |name|
@name = name
end
Expand Down
2 changes: 1 addition & 1 deletion test/active_model_serializers/json_pointer_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ def test_primary_data_pointer
assert_equal '/data', pointer
end

def test_unkown_data_pointer
def test_unknown_data_pointer
assert_raises(TypeError) do
ActiveModelSerializers::JsonPointer.new(:unknown)
end
Expand Down

0 comments on commit bba724c

Please sign in to comment.