I got a NoMethodError if switch to #product. Below is the error. Thanks.
Started PUT "/products/1-fp1" for 127.0.0.1 at 2013-11-04 21:42:48 +0800
Processing by ProductsController#update as JS
Parameters: {"render_options"=>{"errors_ok"=>"1"},
"render"=>{"0"=>{"part_context"=>"BAhbCDoQZmluZ2VycHJpbnRJIgl0aGlzBjoGRVRbAA==--acb081fcda04574d1a896a4a7c42051489dce575",
"id"=>"product"},
"1"=>{"part_context"=>"BAhbCDoNY2F0ZWdvcnlJIhtmaW5nZXJwcmludDoxOmNhdGVnb3J5BjoGRUZbAA==--99acc85bba99aecb0fe9763db992a78e35a6cd68",
"id"=>"category"},
"2"=>{"part_context"=>"BAhbCDoNY2F0ZWdvcnlJIhtmaW5nZXJwcmludDoxOmNhdGVnb3J5BjoGRUZbAA==--99acc85bba99aecb0fe9763db992a78e35a6cd68",
"id"=>"category"}}, "page_path"=>"/products",
"authenticity_token"=>"yPzoeAP/lpYwW361y3Qen7krhZH0KdAuDme6PW7vsO8=",
"product"=>{"category_id"=>"3"}, "id"=>"1-fp1"}
User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = ?
LIMIT 1 [["id", "1"]]
Product Load (0.2ms) SELECT "products".* FROM "products" WHERE
"products"."id" = ? LIMIT 1 [["id", "1-fp1"]]
(0.1ms) begin transaction
(0.4ms) UPDATE "products" SET "category_id" = 3, "updated_at" =
'2013-11-04 13:42:48.252787' WHERE "products"."id" = 1
(0.9ms) commit transaction
Call part: product. this-id = this, locals = []
Completed 500 Internal Server Error in 25ms
NoMethodError (undefined method `empty?' for #<Product:0x007fe8d52335a0>):
app/views/products/index.dryml:4:in `block in product_part'
app/views/products/index.dryml:3:in `product_part'
Rendered
/Users/william/.rvm/gems/ruby-2.0.0-p247/gems/actionpack-3.2.14/lib/action_dispatch/middleware/templates/rescues/_trace.erb
(2.7ms)
Rendered
/Users/william/.rvm/gems/ruby-2.0.0-p247/gems/actionpack-3.2.14/lib/action_dispatch/middleware/templates/rescues/_request_and_response.erb
(1.6ms)
Rendered
/Users/william/.rvm/gems/ruby-2.0.0-p247/gems/actionpack-3.2.14/lib/action_dispatch/middleware/templates/rescues/diagnostics.erb
within rescues/layout (16.5ms)
--
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/groups/opt_out.