-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Good work Quiliro, you found the right solution ;)
El 16/07/14 07:35, Quiliro Ordóñez Baca escribió: > > El 15/07/14 22:20, Quiliro Ordóñez Baca escribió: >> I can now see the administative_unit on the employee edit page. >> But when I try to save the changes to this, I get no error and at >> the same time the administrative_unit does not reflect the change >> that I made. These are the contents of the models. >> >> class AdministrativeUnit < ActiveRecord::Base >> >> hobo_model # Don't put anything above this >> >> fields do name :string timestamps end attr_accessible :name, >> :employees has_many :employees, :accessible => true >> >> >> class Employee < ActiveRecord::Base >> >> hobo_model # Don't put anything above this >> >> fields do name :string timestamps end >> >> attr_accessible :name, :administrative_unit belongs_to >> :administrative_unit > > When I changed: > > -attr_accessible :name, :administrative_unit > > +attr_accessible :name, :administrative_unit, > :administrative_unit_id > > I got the error: > > > unknown attribute: administrative_unit_id > > But then I remembered to make a migration because I had changed > the models. It worked! > > -- Saludos libres, Quiliro Ordóñez 600 8579 > -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iEYEARECAAYFAlPH6sgACgkQBPlUJ6RHaOSuwgCfYLxurpwxoJMLwPaDTrXl2tfq IzMAoI4ybE0v3e4IrjhmIAqOX9Iy96nj =CBvd -----END PGP SIGNATURE----- -- You received this message because you are subscribed to the Google Groups "Hobo Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/hobousers. For more options, visit https://groups.google.com/d/optout.
