Running hobo 1.3 it appears that running hobo g migration doesn't work when 
there is a polymorphic association between models.

First here is the errror.

Hobo Command Line Interface 1.3.0
/home/bsleys/.rvm/gems/ruby-1.8.7-p352@HazMatTracking/bundler/gems/hobo-900179e80104/hobo/lib/generators/hobo/routes/router.rb:56:in
 
`owner_routes': Hob routing error -- can't find reverse association for 
Sample#sample_test (e.g. the :has_many that corresponds to a :belongs_to) 
(Hobo::Error)

And my models, extra stuff clipped.

class Sample < ActiveRecord::Base
  hobo_model # Don't put anything above this
  fields do
    positive :boolean
    result   :string
    timestamps
  end
  belongs_to :sample_test, :polymorphic => true
  ....
end

class Asbestos < ActiveRecord::Base
  hobo_model # Don't put anything above this
  fields do
    name :string
    timestamps
  end
  belongs_to :material
  has_many :samples, :as => :sample_test
  ...
end

class Lead < ActiveRecord::Base
  hobo_model # Don't put anything above this
  fields do
    note :text
    timestamps
  end
  belongs_to :material
  has_many :samples, :as => :sample_test
  ...
end

class Pcb < ActiveRecord::Base
  hobo_model # Don't put anything above this
  fields do
    name :string
    notes :text
    timestamps
  end
  belongs_to :material
  has_many :samples, :as => :sample_test
  ...
end

-- 
You received this message because you are subscribed to the Google Groups "Hobo 
Users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/hobousers/-/lCYLK9lHqU4J.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/hobousers?hl=en.

Reply via email to