Skip to content

Commit

Permalink
Add documentation for the available_flags methods.
Browse files Browse the repository at this point in the history
  • Loading branch information
acmetech committed Mar 18, 2012
1 parent 7e59f7a commit a37c16c
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion README.rdoc
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ migrate the database

# Get the flagging with a specified flag.
article.flaggings.with_flag(:flag_name)

# Get the flagger of the flagging.
flagging = article.flaggings.with_flag(:flag_name).first
user = flagging.flagger
Expand All @@ -78,6 +78,12 @@ migrate the database
# Flaggings can also be accessed by its flagger.
flagger.flaggings or flagger.flaggings.with_flag(:flag_name)

# Get the available flags for a flaggable
article.available_flags

# Get the available flags for a flaggable class
Article.available_flags

== Testing

MakeFlaggable uses RSpec for testing and has a rake task for executing the provided specs
Expand Down

0 comments on commit a37c16c

Please sign in to comment.