Last active
March 16, 2022 02:32
-
-
Save thiagovsk/bdcca4e7a8e5bd37a209fef1cbd2a10f to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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