Skip to content

Instantly share code, notes, and snippets.

@thiagovsk
Last active March 16, 2022 02:32
Embed
What would you like to do?
require "active_support/concern"
module M
extend ActiveSupport::Concern
included do
has_many :things
scope :disabled, -> { where(disabled: true) }
after_commit :send_email
validates :email, length: { maximum: 255 }, email: true
end
def instance_method
end
class_methods do
...
end
private
def send_email
send_emails_here
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment