This only saves the @person but not the @address. Shouldn't it save both? @person = Person.new(params[:person]) @address = Address.new(params[:address]) @person.address << @address @person.save here is what I have: class Person < ActiveRecord::Base has_many :addressables has_many :addresses, :through => :addressables end class Address < ActiveRecord::Base has_many :addressables has_many :people, :through => :addressables end class Addressable < ActiveRecord::Base belongs_to :address belongs_to :person end Any help would be appreciated, Thanks Serge
on 2006-04-08 08:28
on 2006-04-10 15:04
Sergio Bayona wrote: > has_many :addressables > belongs_to :person > end No, at present you have to explicitly create the Addressable object. You may be better of using a has_and_belongs_to_many association, since your Person<->Address association has no accessory attributes. -- We develop, watch us RoR, in numbers too big to ignore.
on 2006-04-10 22:30
Hi Folks, I just upgraded rails from 1.0.0 to 1.1.2. Suddenly, some of my "if conditions" stopped working as expected. It seems as though Rails/ActiveRecord now treats tinyint(1) columns as boolean instead of integers (like v1.0.0). I was just wondering if anybody else has experienced similar behavior? If so, is there a quick work-around that doesn't involve me doing a search and replace and retesting my entire app? TIA!
on 2006-04-10 22:45
BTW, I am using mysql 5.0.16 and ruby 1.8.2
on 2006-10-10 07:07
yeah ive been experiencing the same thing, anybody know how to get around this or what the deal is?