Hi all.

I have the following (simplified) model:

class Address < ActiveRecord::Base
  hobo_model # Don't put anything above this
  fields do
          street :string
          nr :string
          floor :integer
          postal_code :integer
          latitude :string
          longitude :string
    timestamps
  end

  belongs_to :person
  belongs_to :building
  belongs_to :apartment

 belongs_to: city
 belongs_to: country

 validates_presence_of :city

end


When i create one address for a building, everything goes, ok, the new
form its rendered (ok) with the title:

New Address

For: Building One

But if i create the building without a city, validation fails and it's
rendered :

New Address

For: (Not Available)

To proceed please correct the following:

City can't be blank

That means that some how the belongs_to its lost and i dont know how
to recover the belongs_to context...

Any ideas?
Thanks in advance.

Ps: hobo version - 0.8.5



-- 
You received this message because you are subscribed to the Google Groups "Hobo 
Users" group.
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