Skip to content

Commit

Permalink
use new AR calls in examples
Browse files Browse the repository at this point in the history
  • Loading branch information
vijaydev committed May 7, 2011
1 parent 7194b39 commit 3056b33
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,12 @@ def to_sentence(options = {})
# Converts a collection of elements into a formatted string by calling
# <tt>to_s</tt> on all elements and joining them:
#
# Blog.find(:all).to_formatted_s # => "First PostSecond PostThird Post"
# Blog.all.to_formatted_s # => "First PostSecond PostThird Post"
#
# Adding in the <tt>:db</tt> argument as the format yields a prettier
# output:
#
# Blog.find(:all).to_formatted_s(:db) # => "First Post,Second Post,Third Post"
# Blog.all.to_formatted_s(:db) # => "First Post,Second Post,Third Post"
def to_formatted_s(format = :default)
case format
when :db
Expand Down

0 comments on commit 3056b33

Please sign in to comment.