Sha256: 4ae2370cf0ba316ccce2a9062bf61cff258d6c57ab0528acbce7734e5ce6fd4c

Contents?: true

Size: 344 Bytes

Versions: 12

Compression:

Stored size: 344 Bytes

Contents

class Address < ActiveRecord::Base
  belongs_to :city
  delegate :state, :to => :city, :allow_nil => true
  belongs_to :addressable, polymorphic: true
  attr_accessible :address, :complement, :description, :district, :number, :zipcode, :latitude, :longitude


  def to_s
    "#{address}, #{number} - #{district} - #{city}/#{state}"
  end


end

Version data entries

12 entries across 12 versions & 2 rubygems

Version Path
mix-rails-0.26.1 mix-rails-addresses/app/models/address.rb
mix-rails-addresses-0.26.1 app/models/address.rb
mix-rails-0.26.0 mix-rails-addresses/app/models/address.rb
mix-rails-addresses-0.26.0 app/models/address.rb
mix-rails-0.25.1 mix-rails-addresses/app/models/address.rb
mix-rails-addresses-0.25.1 app/models/address.rb
mix-rails-0.25.0 mix-rails-addresses/app/models/address.rb
mix-rails-addresses-0.25.0 app/models/address.rb
mix-rails-0.24.1 mix-rails-addresses/app/models/address.rb
mix-rails-addresses-0.24.1 app/models/address.rb
mix-rails-0.24.0 mix-rails-addresses/app/models/address.rb
mix-rails-addresses-0.24.0 app/models/address.rb