So to make sure I understand your issue,  when you create the instances
through active scaffold and you do not yet have a Course it does not know
what course_id to set on the instance.  You fixed this issue by allowing an
instance to be created with out a course_id.  So now your issue is that you
create instances and they show up on your course page, but when you create
the Course these instances are not associated with the course.



On Fri, Feb 13, 2009 at 4:53 AM, [email protected] <
[email protected]> wrote:

>
> Re-reading my post, I realise that I made a mistake in the Course
> model (only in my post, not in my actual source). It should read like
> this:
>
> class Course < ActiveRecord::Base
>   # there are no course_dates, just instances
>  # has_many :course_dates, :dependent => :destroy
>  has_many :instances, :dependent => :destroy
> end
>
> class Instance < ActiveRecord::Base
>  belongs_to :course
> end
> ...
>
> Sorry for the confusion.
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"ActiveScaffold : Ruby on Rails plugin" 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/activescaffold?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to