minor fixesin READMEs

This commit is contained in:
Vijay Dev 2010-12-20 01:07:33 +05:30
parent 4197fad841
commit 4038a6bc0f
4 changed files with 6 additions and 6 deletions

View File

@ -59,7 +59,7 @@ generated would look like this:
Mr. david@loudthinking.com 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 <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. simply call the method and optionally call +deliver+ on the return value.

View File

@ -262,7 +262,7 @@ methods:
layout "weblog/layout" layout "weblog/layout"
def index def index
@posts = Post.find(:all) @posts = Post.all
end end
def show def show

View File

@ -84,7 +84,7 @@ modules:
attr_reader :errors attr_reader :errors
def validate! def validate!
errors.add(:name, "can not be nil") if name == nil errors.add(:name, "can not be nil") if name.nil?
end end
def ErrorsPerson.human_attribute_name(attr, options = {}) def ErrorsPerson.human_attribute_name(attr, options = {})
@ -94,10 +94,10 @@ modules:
end end
person.errors.full_messages person.errors.full_messages
# => ["Name Can not be nil"] # => ["Name can not be nil"]
person.errors.full_messages person.errors.full_messages
# => ["Name Can not be nil"] # => ["Name can not be nil"]
{Learn more}[link:classes/ActiveModel/Errors.html] {Learn more}[link:classes/ActiveModel/Errors.html]

View File

@ -95,7 +95,7 @@ Collections can also be requested in a similar fashion
# #
# for GET http://api.people.com:3000/people.xml # for GET http://api.people.com:3000/people.xml
# #
people = Person.find(:all) people = Person.all
people.first # => <Person::xxx 'first' => 'Ryan' ...> people.first # => <Person::xxx 'first' => 'Ryan' ...>
people.last # => <Person::xxx 'first' => 'Jim' ...> people.last # => <Person::xxx 'first' => 'Jim' ...>