Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- validates_with_method :check_publisher
- def check_publisher
- return [false, "must be a publisher, or admin. Sorry"] if new_record? && (self.owner.nil? || !(self.owner.publisher? || self.owner.admin?))
- end
Add Comment
Please, Sign In to add comment