Keep on Truckin',  and let us know how to improve the tutorials....

-Owen

On Sun, Apr 4, 2010 at 4:08 AM, storitel <[email protected]> wrote:

> hi Matt,
> thanks for your help - you were right, the Job was being created
> without a name, and i'd set :name :required.
>
> i'm not just new to hobo... new to rails and ruby too so lots to
> learn :-)
>
> On Apr 3, 5:50 pm, Matt Jones <[email protected]> wrote:
> > On Apr 3, 2010, at 4:52 AM, storitel wrote:
> >
> >
> >
> > > hi guys,
> > > been fiddling with hobo for a few days, working through tutorials and
> > > loving how quick it is to get the bones of an app together...
> >
> > > then BAM!  I hit an Exception and can't figure out where to look to
> > > identify what got broken! :(
> >
> > > I'm working on a simple app to assign engineers to projects... the
> > > models are equivalent to the Recipe/Category relationship in the Rapid
> > > Rails With Hobo book...
> >
> > > engineer...
> > >  has_many :projects, :through => :jobs
> > >  has_many :jobs, :dependent => :destroy
> >
> > > job...
> > >  belongs_to :project
> > >  belongs_to :engineer
> >
> > > project
> > >  has_many :engineers, :through => :jobs, :accessible => true
> > >  has_many :jobs
> >
> > > So on the edit page for a project I have an <Add Engineer> dropdown.
> > > When i use it, the engineer gets added to the page OK, but when I hit
> > > Save ... i get the exception...
> >
> > > ActiveRecord::RecordInvalid in ProjectsController#update
> >
> > > Validation failed: Name can't be blank
> >
> > > As far as I can see the project name, engineer name and job name are
> > > not blank. Any guidance on where to look to track down this bug or how
> > > to read the traces in general would be much appreciated
> >
> > Well, posting the trace will help. :)
> >
> > Posting the DRYML for the form will be handy as well; my guess is that
> > you've got a setup where somehow a Job is being created that doesn't
> > pass validation (if you set up a Project and an Engineer in the
> > console, does:
> >
> > project.engineers << engineer
> >
> > work?)
> >
> > Hope this helps!
> >
> > --Matt Jones
>
> --
> 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]<hobousers%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/hobousers?hl=en.
>
>


-- 
Thanks,
- Owen

-- 
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