The agility tutorial has not been updated for Hobo 2.0 or current
Rails yet. I'm slowly working my way through the documentation and
am about half done. Unfortunately the tutorial is in the half that
isn't done.
You need to add your associations to your attr_accessible for them to
be visible on the forms. You probably don't need all of what I'm
adding below, but you will need some:
attr_accessible :description, :story, :story_id, task_assignments, :users
> ...
>
> users.rb
> class User < ActiveRecord::Base
>
> hobo_user_model # Don't put anything above this
>
> fields do
> name :string, :required, :unique
> email_address :email_address, :login => true
> administrator :boolean, :default => false
> timestamps
> end
> validates_presence_of :name
> has_many :task_assignments, :dependent => :destroy, :inverse_of => :user
> has_many :tasks, :through => :task_assignments, :accessible => true,
> :dependent => :destroy
>
> attr_accessible :name, :email_address, :password, :password_confirmation
attr_accessible :name, :email_address, :password,
:password_confirmation, :task_assignments, :tasks
> ...
> task_assignments.rb
> class TaskAssignment < ActiveRecord::Base
>
> hobo_model # Don't put anything above this
>
> fields do
> timestamps
> end
> belongs_to :user, :inverse_of => :task_assignments
> belongs_to :task, :inverse_of => :task_assignments
>
> attr_accessible
attr_accessible :task, :task_id, :user, :user_id
Bryan