Kristian, I think what you are doing is worthwhile, so don't get discouraged, I like what you did with the container tags, just take a breather once in awhile and know that Hobo still being a zero dot version has some bugs in it, maybe you have found one. If you think it is post it on lighthouse. https://hobo.lighthouseapp.com/dashboard
The kind of user interfaces that ExtJS offers are (IMHO) going to be the ones that developers gravitate towards in the future, so getting them to work with Hobo is important. Brett On Sep 14, 5:42 am, Kristian <[email protected]> wrote: > Hi, > > Today I tried to run through the examples in the "Hobo Book", using > Hobo 0.8.8. > I am stuck on page 57 of Chapter 4, where you try to create Many-to- > Many associations. > > I event tried to copy-paste the fields and associations from the book > directly into recipe.rb, category.rb and category_assignment.rb > > category_assignment.rb > ---------------------- > fields do > timestamps > end > > belongs_to :category > belongs_to :recipe > > category.rb > ---------------------- > fields do > name :string > timestamps > end > > has_many :recipes, :through => :category_assignments > has_many :category_assignments, :dependent => :destroy > > recipe.rb > ---------------------- > fields do > title :string > body :text > timestamps > end > > has_many :categories, :through => :category_assignments, :accessible > => true > has_many :category_assignments, :dependent => :destroy > belongs_to :country > > --- > > Even if I rollback to step 1 of my migrations and do a new > hobo_migration I get the following schema: > > create_table "categories", :force => true do |t| > t.string "name" > t.datetime "created_at" > t.datetime "updated_at" > end > > create_table "category_assignments", :force => true do |t| > t.datetime "created_at" > t.datetime "updated_at" > t.integer "category_id" > t.integer "recipe_id" > end > > create_table "recipes", :force => true do |t| > t.string "title" > t.text "body" > t.datetime "created_at" > t.datetime "updated_at" > t.integer "country_id" > end > > --- > Which look completely fine! > > In the interface for New/Edit Recipe, I get a drop-down to select a > Category, but when I make a selection nothing happens. > When I make a save, it still says "No category assignments" and when I > go back to edit, I can see my selection wasn't saved. > --- > > If I look in the console log, I can see this: > > Processing RecipesController#update (for 127.0.0.1 at 2009-09-14 > 14:37:50) [PUT] > Parameters: {"page_path"=>"recipes/edit", > "authenticity_token"=>"VJvWuMq34S5pxT4rs1eyRpO2DiI87bpSB0x3BcBxsNc=", > "id"=>"1-abe", "recipe"=>{"body"=>"Hello", "title"=>"Abe", > "country_id"=>"1", "categories"=>[""]}} > -- > > So obviously, the categories parameter remains empty on submit. > > -- > Looking in the HTML source code: > > <div class="input select-many categories-tag array recipe-categories" > name="recipe[categories]"> > <div class="item-proto" style="display: none;"> > <div class="item proto-item"> > <span/> > <input class="proto-hidden" type="hidden" name="recipe[categories][]"/ > > <input class="remove-item proto-remove-button" type="button" > value="Remove"/> > </div> > </div> > <div class="items"> </div> > <select> > <option value="">Add Category</option> > <option value="@1">sour</option> > </select> > </div> > > ... > > So why does the select being generated have no name? > > --- > > Kristian > > PS: Really struggling with the Hobo framework so far... > > -- > On Sep 6, 7:18 pm, Dale Gregory <[email protected]> wrote: > > > I just finished running through it and as a very new to rails and hobo > > user it answered a lot of questions I had. Now to get the last 10% of > > my app finished :) --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
