Module: Blueprints::Extensions::Blueprintable

Includes:
Extendable
Included in:
Saveable, SoftSaveable
Defined in:
lib/blueprints/extensions.rb

Overview

Include this module into your class if you need klass.blueprint and object.blueprint methods.

Defined Under Namespace

Modules: ClassMethods

Instance Method Summary collapse

Methods included from Extendable

included

Instance Method Details

#blueprint(attributes) ⇒ Object Also known as: blueprint_without_save

Updates attributes of object by calling setter methods. Does same as update_attributes! except it also bypasses attr_protected and attr_accessible.

Parameters:

  • attributes (Hash)

    Attributes that are used to update object.


61
62
63
64
65
# File 'lib/blueprints/extensions.rb', line 61

def blueprint(attributes)
  attributes.each do |attribute, value|
    blueprint_attribute attribute, value
  end
end