can_has_flagz
Provides handy flags hash for your models
Example Usage
User Model
class User < ActiveRecord::Base
can_has_flagz
after_save :send_confirmation_email
protected
def send_confirmation_email
UserMailer.deliver_confirmation_mail(self) unless flag[:skip_confirmation_email]
end
end
Some Controller Method
@user = User.new(params[:user])
@user.flag[:skip_confirmation_email] = true
@user.save
Copyright
Copyright © 2011 Naomi Kyoto. See LICENSE for details.