提交 f649d137 编写于 作者: J Jason Voegele

Merge branch 'master' of github.com:lifo/docrails

......@@ -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
......@@ -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
......
......@@ -38,7 +38,7 @@ When you do end up destroying your testing database (and it will happen, trust m
h4. Rails Sets up for Testing from the Word Go
Rails creates a +test+ folder for you as soon as you create a Rails project using +rails _application_name_+. If you list the contents of this folder then you shall see:
Rails creates a +test+ folder for you as soon as you create a Rails project using +rails new _application_name_+. If you list the contents of this folder then you shall see:
<shell>
$ ls -F test/
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册