Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Update README to reflect changes to #preferences

  • Loading branch information...
commit 450f979cf507897b5b3933fb5d0c0a747238aede 1 parent 067dc21
@obrie obrie authored
Showing with 6 additions and 7 deletions.
  1. +6 −7 README.rdoc
View
13 README.rdoc
@@ -162,14 +162,13 @@ preferences by name. For example,
user = User.find(:first)
- user.preferred_color = 'red', 'automobiles'
- user.preferred_color = 'tan', 'clothing'
+ user.preferred_color = 'red', :automobiles
+ user.preferred_color = 'tan', :clothing
- user.preferred_color('automobiles') # => "red"
- user.preferred_color('clothing') # => "tan"
-
- user.preferences # => {"color"=>nil, "automobiles"=>{"color"=>"red"}, "clothing=>{"color=>"tan"}}
- user.preferences('automobiles') # => {"color"=>"red"}
+ user.preferred_color(:automobiles) # => "red"
+ user.preferred_color(:clothing) # => "tan"
+
+ user.preferences(:automobiles) # => {"color"=>"red"}
=== Saving preferences
Please sign in to comment.
Something went wrong with that request. Please try again.