Created
November 26, 2011 16:18
Relational problem
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The problem is this: | |
class Cmr < ActiveRecord::Base | |
belongs_to :ruta | |
... | |
end | |
class Cmr24 < Cmr | |
... | |
end | |
class Ruta < ActiveRecord::Base | |
has_many :cmrs, :dependent => :nullify | |
... | |
end | |
ruby-1.9.2-p0 > @cmr = Cmr.first | |
Cmr Load (0.1ms) SELECT `cmrs`.* FROM `cmrs` LIMIT 1 | |
=> #<Cmr24 id: 633, codigo: "C1060", cmr_type: nil, direccion: "Maipu 1685", status: 1, ruta_id: 22, type: "Cmr24", zona: nil> | |
ruby-1.9.2-p0 > @cmr.ruta | |
Mysql2::Error: Table 'eco_development.ruta' doesn't exist: SHOW FIELDS FROM `ruta` ..... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment