Created
August 1, 2014 02:41
-
-
Save pinzolo/d71dc92e446fb8f34b1e 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
module MyModel | |
extend ActiveSupport::Concern | |
included do | |
__send__(:include, ActiveModel::Conversion) | |
__send__(:include, ActiveModel::Validations) | |
extend ActiveModel::Naming | |
extend ActiveModel::Translation | |
class << self | |
alias_method_chain :i18n_scope, :my_model | |
end | |
end | |
module ClassMethods | |
def i18n_scope_with_my_model | |
: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