Module: Stall::Addressable

Extended by:
ActiveSupport::Concern
Defined in:
lib/stall/addressable.rb

Instance Method Summary collapse

Instance Method Details

#address_ownership_for(type) ⇒ Object



16
17
18
19
20
# File 'lib/stall/addressable.rb', line 16

def address_ownership_for(type)
  address_ownerships.find do |ownership|
    ownership.public_send(type)
  end if [:shipping, :billing].include?(type.to_sym)
end