Hi Bryan,
Progress! This approach works very well for the display and selection
of the data. However, I cannot save the Master detail form at all.
When I try to save, I get:

NoMethodError in SalesController#update

You have a nil object when you didn't expect it!
The error occurred while evaluating nil.proxy_owner
RAILS_ROOT: /Users/mike/Dropbox/bookem

Application Trace | Framework Trace | Full Trace
/Library/Ruby/Gems/1.8/gems/hobo-0.8.8/lib/hobo/
accessible_associations.rb:8:in `prepare_has_many_assignment'
/Library/Ruby/Gems/1.8/gems/hobo-0.8.8/lib/hobo/
accessible_associations.rb:98:in `items='
/Library/Ruby/Gems/1.8/gems/activerecord-2.3.2/lib/active_record/
base.rb:2745:in `send'
/Library/Ruby/Gems/1.8/gems/activerecord-2.3.2/lib/active_record/
base.rb:2745:in `attributes_without_hobo_type_conversion='
/Library/Ruby/Gems/1.8/gems/activerecord-2.3.2/lib/active_record/
base.rb:2741:in `each'
/Library/Ruby/Gems/1.8/gems/activerecord-2.3.2/lib/active_record/
base.rb:2741:in `attributes_without_hobo_type_conversion='

It looks like it is having context problems with which record to
save.
Any ideas?

Thanks in advance!
 Mike


On Jun 29, 5:57 pm, Bryan Larsen <[email protected]> wrote:
> In general, JQuery widgets are usually fairly easy to integrate.  For a
> simple example, look at the datepicker in hobo-jquery:  it's 4 lines of
> cde in hobo-jquery.dryml and 3 in hobo-jquery.js.
>
> Bryan
>
>
>
> > I've also seem some very impressive jquery sortable/editable tables
> > but I don't think they would be that easy to integrate into a hobo
> > app.
>
> >  - Mike
>
> > On Jun 29, 2:43 pm, Bryan Larsen <[email protected]> wrote:
> >> Sorry, I understand the question now.
>
> >> input-many uses a field-list rather than a form, and field-list is not a
> >> polymorphic tag.  So in Hobo 1.0, there's no easy way around your
> >> problem.  hobo-jquery partially fixes this problem, and Tom has some
> >> plans for Hobo >1.0.
>
> >> But in the meantime, here's what I'd do, to keep everything as DRY as
> >> possible.
>
> >> <def tag="item-fieldlist">
> >>     define guts of form here...
> >> </def>
>
> >> <def tag="form" for="Item">
> >>     <item-fieldlist/>
> >> </def>
>
> >> <def tag="form" for="Sale">
> >>     <field-list:>
> >>        <items-view:>
> >>           <input-many>
> >>              <item-fieldlist/>
> >>           </input-many>
> >>        </items-view:>
> >>     </field-list:>
> >> </def>
>
> >> kevinpfromnm wrote:
> >>> Yeah, I was wondering this too.  It doesn't seem to use the same form
> >>> code for the guts of the input-many... which makes sense since it's
> >>> inside a form already but is annoying as it means possibly needing to
> >>> code the form twice or once and include in the normal form.
> >>> On Jun 29, 9:54 am, Bryan Larsen <[email protected]> wrote:
> >>>> You seem to be on the right track.  Can you post your code?   Are you
> >>>> putting your override in application.dryml?
> >>>> oldlibmike wrote:
> >>>>> I have a master detail relationship with Sales and Items.
> >>>>> Sales has_many :items, :accessible => true, :dependent => :destroy
> >>>>> Items belongs_to :sale
> >>>>> When I display the sales edit form, there is a repeating group
> >>>>> of :items that I can presumably edit, add or delete.
> >>>>> I have tried to override the form for item and when editing an item
> >>>>> all by itself, my overrides work.
> >>>>> When the item appears on the sales edit form however, none of my
> >>>>> overrides are there. The default edit form for item is displayed.
> >>>>> How would I overrided the item form in the context of its parent Sale?
> >>>>> Thanks in advance,
> >>>>>  Mike
--~--~---------~--~----~------------~-------~--~----~
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