Guest User

Untitled

a guest
May 24th, 2018
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.78 KB | None | 0 0
  1. class Account < ActiveRecord::Base
  2. has_one :contact, :as => :primary_contact
  3. has_many :contacts
  4. has_one :payment_method, :as => :default_payment_method
  5. has_many :telephone_handlers
  6. has_many :mail_handlers
  7. end
  8.  
  9. class Contact < ActiveRecord::Base
  10. belongs_to :account
  11. has_one :address, :as => :primary_postal_address
  12. has_many :addresses
  13. has_one :telephone_number, :as => :primary_telephone_number
  14. has_many :telephone_numbers
  15. has_one :email_address, :as => :primary_email_address
  16. has_many :email_addresses
  17. end
  18.  
  19. Mysql::Error: Unknown column 'payment_methods.default_payment_method_id' in 'where clause': SELECT * FROM `payment_methods` WHERE (`payment_methods`.default_payment_method_id = 5 AND `payment_methods`.default_payment_method_type = 'Account') LIMIT 1
Add Comment
Please, Sign In to add comment