Skip to content

Instantly share code, notes, and snippets.

@nthock
Created November 10, 2017 02:08
Show Gist options
  • Save nthock/891bbd26b7ebfc5c6b740b536e2e5348 to your computer and use it in GitHub Desktop.
Save nthock/891bbd26b7ebfc5c6b740b536e2e5348 to your computer and use it in GitHub Desktop.
def status_validations
rules = THE_RULES[self.event.status]
unless rules.nil?
errors.add(:status, 'Invalid update of Event Seat due to the current event status.') unless rules[status_was.to_sym].include? status
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment