Skip to content

Commit

Permalink
Update to readme for acts_as_ordered_taggable
Browse files Browse the repository at this point in the history
  • Loading branch information
Chris Hilton committed Mar 29, 2012
1 parent 9466925 commit d143795
Showing 1 changed file with 15 additions and 15 deletions.
30 changes: 15 additions & 15 deletions README.rdoc
Expand Up @@ -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
Expand Down

0 comments on commit d143795

Please sign in to comment.