-
Notifications
You must be signed in to change notification settings - Fork 6
Manage moderations
mrbrdo edited this page Jun 9, 2012
·
8 revisions
To see pending moderations, simply call
Moderation.all
You can also see moderations for a specific record. For example, if you have Post model, you can call moderations on it.
post = Post.first post.moderations
Moderation is a normal ActiveRecord model, you can inspect it in rails console to see what it holds. Data is serialized in YAML format
moderation.data
The data can be deserialized using YAML::load, but this has already been done for you
moderation.parsed_data
To accept a moderation, call
moderation.accept
to discard (destroy) it, call
moderation.discard
Do not use moderation.destroy, because discard triggers certain callbacks which may be necessary.