提交 4038a6bc 编写于 作者: V Vijay Dev

minor fixesin READMEs

上级 4197fad8
......@@ -59,7 +59,7 @@ generated would look like this:
Mr. david@loudthinking.com
In previous version of rails you would call <tt>create_method_name</tt> and
In previous version of Rails you would call <tt>create_method_name</tt> and
<tt>deliver_method_name</tt>. Rails 3.0 has a much simpler interface, you
simply call the method and optionally call +deliver+ on the return value.
......
......@@ -262,7 +262,7 @@ methods:
layout "weblog/layout"
def index
@posts = Post.find(:all)
@posts = Post.all
end
def show
......
......@@ -84,7 +84,7 @@ modules:
attr_reader :errors
def validate!
errors.add(:name, "can not be nil") if name == nil
errors.add(:name, "can not be nil") if name.nil?
end
def ErrorsPerson.human_attribute_name(attr, options = {})
......@@ -94,10 +94,10 @@ modules:
end
person.errors.full_messages
# => ["Name Can not be nil"]
# => ["Name can not be nil"]
person.errors.full_messages
# => ["Name Can not be nil"]
# => ["Name can not be nil"]
{Learn more}[link:classes/ActiveModel/Errors.html]
......
......@@ -95,7 +95,7 @@ Collections can also be requested in a similar fashion
#
# for GET http://api.people.com:3000/people.xml
#
people = Person.find(:all)
people = Person.all
people.first # => <Person::xxx 'first' => 'Ryan' ...>
people.last # => <Person::xxx 'first' => 'Jim' ...>
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册