Module: Sprangular::AddressDecorator
- Defined in:
- app/models/spree/address_decorator.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.prepended(klass) ⇒ Object
2 3 4 |
# File 'app/models/spree/address_decorator.rb', line 2 def self.prepended(klass) klass.belongs_to :user, class_name: 'Spree::User' end |
Instance Method Details
#same_as?(other) ⇒ Boolean
6 7 8 9 |
# File 'app/models/spree/address_decorator.rb', line 6 def same_as?(other) return false if other.nil? attributes.except('id', 'updated_at', 'created_at', 'user_id') == other.attributes.except('id', 'updated_at', 'created_at', 'user_id') end |