I also use this kind of validations in another project and I get the
same general error.  Is there a better way to handle these kind of
association errors?

On Aug 13, 6:38 pm, Me <[email protected]> wrote:
> okie dokie
>
> class Eqptattr < ActiveRecord::Base
>         belongs_to :site
>         belongs_to :equipment
>
>                 validates_presence_of :ip
> end
>
> class Site < ActiveRecord::Base
>         has_many :eqptattrs, :dependent => :destroy
>         has_many :equipments, :through => :eqptattrs
>
>                 validates_uniqueness_of :name
>                 validates_associated :eqptattrs
> end
>
> class Equipment < ActiveRecord::Base
>         has_many :eqptattrs, :dependent => :destroy
>         has_many :sites, :through => :eqptattrs
> end
>
> On Aug 13, 3:46 pm, Rails List <[email protected]>
> wrote:
>
> > Chris Habgood wrote:
> > > Is the any way to get more descriptive of the errors associated with
> > > the associated model?
>
> > > I have a site model that has:
>
> > > validates_associated :Eqptattrs
>
> > > and below is the error generated from the associated model.
>
> > > There were problems with the following fields:
>
> > >     * Eqptattrs is invalid
>
> > If i were you, i would provide the model itself to help others
> > investigate the issue clearly.
> > --
> > Posted viahttp://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" 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/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to