Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Update to readme for acts_as_ordered_taggable

  • Loading branch information...
commit d1437957d3b6356e127793b8a17fb3c9d6172e1b 1 parent 9466925
@chrismhilton chrismhilton authored
Showing with 15 additions and 15 deletions.
  1. +15 −15 README.rdoc
View
30 README.rdoc
@@ -61,21 +61,21 @@ directory, you can run the specs for RoR 3.x with:
To preserve the order in which tags are created use acts_as_ordered_taggable:
- class User < ActiveRecord::Base
- # Alias for <tt>acts_as_ordered_taggable_on :tags</tt>:
- acts_as_ordered_taggable
- acts_as_ordered_taggable_on :skills, :interests
- end
-
- @user = User.new(:name => "Bobby")
- @user.tag_list = "east, south"
- @user.save
-
- @user.tag_list = "north, east, south, west"
- @user.save
-
- @user.reload
- @user.tag_list => ["north", "east", "south", "west"]
+ class User < ActiveRecord::Base
+ # Alias for <tt>acts_as_ordered_taggable_on :tags</tt>:
+ acts_as_ordered_taggable
+ acts_as_ordered_taggable_on :skills, :interests
+ end
+
+ @user = User.new(:name => "Bobby")
+ @user.tag_list = "east, south"
+ @user.save
+
+ @user.tag_list = "north, east, south, west"
+ @user.save
+
+ @user.reload
+ @user.tag_list # => ["north", "east", "south", "west"]
=== Finding Tagged Objects
Please sign in to comment.
Something went wrong with that request. Please try again.