Skip to content

Commit

Permalink
Update serializer.rb
Browse files Browse the repository at this point in the history
Minor typos.
  • Loading branch information
beauby committed Oct 10, 2015
1 parent b4ba081 commit c678a3a
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions lib/active_model/serializer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ def self.attribute(attr, options = {})

# @api private
# Used by FragmentCache on the CachedSerializer
# to call attribute methods on the fragmented cached serializer
# to call attribute methods on the fragmented cached serializer.
def self.fragmented(serializer)
self._fragmented = serializer
end
Expand Down Expand Up @@ -173,7 +173,7 @@ def self.adapter
end

# Used to cache serializer name => serializer class
# when looked up by Serializer.get_serializer_for
# when looked up by Serializer.get_serializer_for.
def self.serializers_cache
@serializers_cache ||= ThreadSafe::Cache.new
end
Expand All @@ -200,8 +200,8 @@ def self.get_serializer_for(klass)
class_attribute :_type, instance_writer: false

# `scope_name` is set as :current_user by default in the controller.
# If the instance does not have a method nameed `scope_name`, it
# defines the method so that calls the +scope+.
# If the instance does not have a method named `scope_name`, it
# defines the method so that it calls the +scope+.
def initialize(object, options = {})
self.object = object
self.instance_options = options
Expand All @@ -216,7 +216,7 @@ def initialize(object, options = {})
end
end

# Used by adapter as resource root
# Used by adapter as resource root.
def json_key
root || object.class.model_name.to_s.underscore
end
Expand Down

0 comments on commit c678a3a

Please sign in to comment.