Re: bad sql after :conditions =>

Oskar Szrajer
2009-01-11T16:25:19Z

Processing PostsController#index (for 127.0.0.1 at 2009-01-11 17:24:48)
[GET]
  Parameters: {"m"=>"01",
"y"=>"2009"}
  SQL (0.1ms)   SET client_min_messages TO ''panic''
  SQL (0.1ms)   SET client_min_messages TO ''notice''
  Post Load (4.5ms)   SELECT * FROM "posts" WHERE (extract(year from
created_at) = E''2009'' AND extract(month from created_at) =
E''01'') ORDER
BY created_at
Rendering template within layouts/application
Rendering posts/index
  SQL (1.1ms)   SELECT count(*) AS count_all FROM "comments" WHERE
("comments".post_id = 2)
  CACHE (0.0ms)   SELECT count(*) AS count_all FROM "comments" WHERE
("comments".post_id = 2)
Rendered posts/_post (23.8ms)
  SQL (0.6ms)   SELECT count(*) AS count_all FROM "comments" WHERE
("comments".post_id = 1)
  CACHE (0.0ms)   SELECT count(*) AS count_all FROM "comments" WHERE
("comments".post_id = 1)
Rendered posts/_post (4.5ms)
  Post Load (13.5ms)   SELECT * FROM "posts" ORDER BY created_at
Rendered arrays/_array (0.7ms)
Completed in 72ms (View: 43, DB: 20) | 200 OK
[http://127.0.0.1/?y=2009&m=01]