Skip to content

Instantly share code, notes, and snippets.

@mrpunkin
Created January 17, 2013 01:58
Show Gist options
  • Save mrpunkin/4552853 to your computer and use it in GitHub Desktop.
Save mrpunkin/4552853 to your computer and use it in GitHub Desktop.
validate :group_is_real
def group_is_real
errors.add(:group, "must be an already existing group") if group_id and !group
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment