Thanks for the reply. The whole thing was caused by not using the right template - I had app/views/inventories/index.dryml but I needed app/views/inventories/index_for_campaign.dryml. Once I used the right view, I had what I wanted. Again, a documentation problem, since this had never been mentioned anywhere.
Thanks for your time! François On 6 déc, 14:48, kevinpfromnm <[email protected]> wrote: > you probably need to add the replace directive to get it to change the > collection. > > oddly, I'd think it should try to render a separate table-plus instead > of a card for each item with the code you listed. here's my take on > how it would've interpreted your code: > > <collection> # if you use the replace, table-plus would replace the > whole tag and not just get put inside it. > <ul ...> > <li repeat ...> > <table-plus fields="this, quantity, updated_at"/> > closing tags > > but since you're getting cards, perhaps it doesn't handle passing > content to the default parameter when called as a parameter. wow, > that's poor wording. btw, the rest of this doesn't deal with your > problem, just describing a potential bug. > > <def tag="some-page"> > ... > <collection param> > content > </collection> > ... > > gets content passed to the default parameter in collection > > <some-page> > <collection:> > content > ... > > content does not get passed to the default parameter. > > On Dec 6, 8:49 am, François Beausoleil <[email protected]> > wrote: > > > > > Ah, I was missing auto_actions :all in InventoriesController. That > > explains why show/edit/update/destroy weren't present. > > > Still, not being able to overwrite the collection on index is a > > bummer... > > > Bye! > > François > > > On 6 déc, 10:46, François Beausoleil <[email protected]> > > wrote: > > > > Hi, > > > > I've > > > foundhttp://groups.google.com/group/hobousers/browse_thread/thread/42a10a3... > > > > All great, but I'm still fighting. This is the entirety of app/views/ > > > inventories/index.dryml > > > > <index-page> > > > > <collection: replace> > > > <table-plus fields="this, quantity, updated_at"/> > > > </collection:> > > > > </index-page> > > > > But on render, I still get cards. The Hobo Agility Tutorial has 3-4 > > > paragraphs on nested routes, but nothing on how to override the view. > > > The Rapid Rails with Hobo book has no mention of "nested routes", > > > either in the index or in the full text. > > > > Notwithstanding that, the show link on the card isn't rendered - it > > > only renders the name, not a link to show/edit the inventory model. > > > For reference, here's the InventoriesController as well: > > > > class InventoriesController < ApplicationController > > > > hobo_model_controller > > > > auto_actions_for :campaign, [:index, :new, :create] > > > > def create > > > hobo_create do > > > redirect_to inventories_for_campaign(@campaign) if valid? > > > end > > > end > > > > end > > > > Where am I going wrong? Where shall I send patches to remedy the > > > missing documentation? > > > > Thanks, > > > François -- 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.
