Hi, El 03/07/14 08:48, JezC escribió: > Context: Ruby 2.1.2, Rails 4.0.5, Hobo 2.1.0 > > I'm relearning hobo, after being away on other projects. So a mix of > newbie questions and some hangovers from older ways to do things - which > might be the problem. > > I have a model Stuff that has Things as children. > > I want to show a table of Things associated with each Stuff. When I show > Stuff-1, I want to see all the Things for Stuff-1, sortable. By default, > the Things are listed in ascending order, as unique cards, rather than > as a table. > > In Hobo 1, I used table-plus, and acts-as-list (years ago) - following > the cookbooks & manual > (http://www.hobocentral.net/tutorials/44-using-multiple-sortable-collection-s-for > and > http://hobocentral.net/manual/controllers#writing-an-action-from-scratch ). >
I believe Hobo doesn't have a table widget that is sortable. I think the recipe you referred (http://www.hobocentral.net/tutorials/44-using-multiple-sortable-collection-s-for) is about having a sortable list of cards. But you can always style it to look like a table :). > In Hobo 2, Rails 4... I'm getting lots of issues. > > Acts-as-list is kinda old and has performance problems. Ranked-models > looks like a better and more modern solution. > > Scoping has changed a lot for Rails 4. > > So... What is the right, modern way to create a sortable table of > children in Hobo 2? The old recipe in the hobo cookbook, and > consequently the Agility tutorial, seems to be terribly dated. I have a > suspicion that there's a better way cooked into Hobo 2, that I can't find. > > I'll gleefully publish my simple 3-model hobo testing app (hobo3model) > for critique. It's designed for me to play with associations and tables, > and omniauth for multiple providers. So when it works, it might be an up > to date version of agility. ;) I didn't know about Ranked-models, thanks for sharing! In theory Hobo 2 should work with acts as list pretty much as it used to, like the Agility tutorial says. But it's possible something might be broken. Could you give us more info about your issues or share your repository? I'll be happy to clone it and play with it a bit. Warm regards, Ignacio > > -- > You received this message because you are subscribed to the Google > Groups "Hobo Users" group. > To unsubscribe from this group and stop receiving emails from it, send > an email to [email protected] > <mailto:[email protected]>. > To post to this group, send email to [email protected] > <mailto:[email protected]>. > Visit this group at http://groups.google.com/group/hobousers. > For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups "Hobo Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/hobousers. For more options, visit https://groups.google.com/d/optout.
