Skip to content

Commit

Permalink
Improve doc styles for ActiveModel::Conversion
Browse files Browse the repository at this point in the history
  • Loading branch information
smartinez87 committed May 5, 2011
1 parent 8e69f1e commit 6826936
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions activemodel/lib/active_model/conversion.rb
Expand Up @@ -21,8 +21,8 @@ module ActiveModel
#
module Conversion
# If your object is already designed to implement all of the Active Model
# you can use the default to_model implementation, which simply returns
# self.
# you can use the default <tt>:to_model</tt> implementation, which simply
# returns self.
#
# If your model does not act like an Active Model object, then you should
# define <tt>:to_model</tt> yourself returning a proxy object that wraps
Expand All @@ -35,13 +35,13 @@ def to_model
# if the object is persisted or not.
#
# Note the default implementation uses persisted? just because all objects
# in Ruby 1.8.x responds to :id.
# in Ruby 1.8.x responds to <tt>:id</tt>.
def to_key
persisted? ? [id] : nil
end

# Returns a string representing the object's key suitable for use in URLs,
# or nil if persisted? is false
# or nil if <tt>persisted?</tt> is false.
def to_param
persisted? ? to_key.join('-') : nil
end
Expand Down

0 comments on commit 6826936

Please sign in to comment.