Rails returns me the following error:
PG::Error: ERROR: relation "srlzd_data" does not exist
It seems that it uses the singularized table name, but I don't know why.
If I force the table name in my SrlzdData model with set_table_name 'srlzd_datas'
it works, but it's a crappy workaround!
Any idea from where it could comes? (Rails 3.2.13 / Ruby 1.9.3)
class SrlzdData < ActiveRecord::Base
belongs_to :user
attr_accessible :interests
end
class User < ActiveRecord::Base
has_one :setting, :dependent => :destroy
has_one :srlzd_data, :dependent => :destroy
attr_accessible :firstname, :lastname,
:setting_attributes, :srlzd_data_attributes
accepts_nested_attributes_for :setting, :srlzd_data
end
Thanks a lot!