Module: Dragonfly::ActiveModelExtensions

Defined in:
lib/dragonfly/active_model_extensions.rb,
lib/dragonfly/active_model_extensions/attachment.rb,
lib/dragonfly/active_model_extensions/validations.rb,
lib/dragonfly/active_model_extensions/class_methods.rb,
lib/dragonfly/active_model_extensions/instance_methods.rb,
lib/dragonfly/active_model_extensions/attachment_class_methods.rb

Defined Under Namespace

Modules: ClassMethods, InstanceMethods, Validations Classes: Attachment

Class Method Summary collapse

Class Method Details

.extended(klass) ⇒ Object



5
6
7
8
9
10
# File 'lib/dragonfly/active_model_extensions.rb', line 5

def self.extended(klass)
  unless klass.include?(InstanceMethods)
    klass.extend(ClassMethods)
    klass.class_eval{ include InstanceMethods }
  end
end