Support mixin for models subclassed from ActiveRecord::Base providing as-per-API-standard internationalisation support. See Hoodoo::ActiveRecord::Translated::ClassMethods#translated for details.
See also:
Namespace
Methods
Class Public methods
included( model )
Link
Instantiates this module when it is included.
Example:
class SomeModel < ActiveRecord::Base
include Hoodoo::ActiveRecord::Translated
# ...
end
model
-
The ActiveRecord::Base descendant that is including this module.
Source: show
# File lib/hoodoo/active/active_record/translated.rb, line 36 def self.included( model ) model.class_attribute( :nz_co_loyalty_hoodoo_translate_with, { :instance_predicate => false, :instance_accessor => false } ) instantiate( model ) unless model == Hoodoo::ActiveRecord::Base super( model ) end
instantiate( model )
Link
When instantiated in an ActiveRecord::Base subclass, all of the Hoodoo::ActiveRecord::Translated::ClassMethods methods are defined as class methods on the including class.
model
-
The ActiveRecord::Base descendant that is including this module.
Source: show
# File lib/hoodoo/active/active_record/translated.rb, line 56 def self.instantiate( model ) model.extend( ClassMethods ) end