Skip to content

Instantly share code, notes, and snippets.

Last active Sep 20, 2018
What would you like to do?
Example: Data Import as a Process
class Workout
property :description, type: String
property :date, type: DateTime
enum status: [:needs_revision, :complete]
property :status, default: :complete
scope :complete, -> { where(status: :complete) }
scope :needs_revision, -> { where(status: :needs_revision) }
validates :date, presence: true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment