Skip to content

Instantly share code, notes, and snippets.

@pinzolo
Created August 1, 2014 02:41
Show Gist options
  • Save pinzolo/145bcd8fd13299b22340 to your computer and use it in GitHub Desktop.
Save pinzolo/145bcd8fd13299b22340 to your computer and use it in GitHub Desktop.
module MyModel
extend ActiveSupport::Concern
included do
__send__(:include, ActiveModel::Conversion)
__send__(:include, ActiveModel::Validations)
extend ActiveModel::Naming
extend ActiveModel::Translation
end
module ClassMethods
def i18n_scope
:my_model
end
end
def persisted?
false
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment