diff --git a/app/views/books/edit.html.haml b/app/views/books/edit.html.haml index da7923d..7e94e11 100644 --- a/app/views/books/edit.html.haml +++ b/app/views/books/edit.html.haml @@ -1,4 +1,6 @@ - form_for @book, :url => update_path do |f| .page.title - = f.text_area :text - = f.submit 'Save the book' \ No newline at end of file + = f.text_area :text + = f.submit 'Save the book' + :javascript + $('book_text').smartArea(); \ No newline at end of file diff --git a/app/views/books/show.html.haml b/app/views/books/show.html.haml index aa66955..0e884c7 100644 --- a/app/views/books/show.html.haml +++ b/app/views/books/show.html.haml @@ -1,10 +1,11 @@ -.page.title +#head.page.title %h1= @book.title %h2= @book.subtitle // = "(#{@book.text.language})" by %h3= @book.author %h3{ :onclick => 'alert("email");' } ✏ +.shadow .page .text= @book.text @@ -13,17 +14,20 @@ splitPages(); }); -.page.title +#tail.page.title %h2 The End %h3 ❦ // ⊛ // ∞ // ∗ +.shadow .hardcopy .pdf - = link_to 'download', pdf_path + = link_to 'd/l', pdf_path %ol.chapternav %li ch. - %li.current 1 \ No newline at end of file + %li.current 1 + %li + = link_to 'title', '#head' \ No newline at end of file diff --git a/app/views/layouts/application.html.haml b/app/views/layouts/application.html.haml index 90c54ea..2a05df3 100644 --- a/app/views/layouts/application.html.haml +++ b/app/views/layouts/application.html.haml @@ -3,6 +3,6 @@ %head %title Bookz = stylesheet_link_tag 'basic' - = javascript_include_tag 'jquery-1.3.2', 'jquery.viewport', 'application' + = javascript_include_tag 'jquery-1.3.2', 'jquery.viewport', 'jquery.smartarea', 'tools.tooltip-1.0.2', 'application' %body = yield \ No newline at end of file diff --git a/log/development.log b/log/development.log index a5f7c3e..f74e52e 100644 --- a/log/development.log +++ b/log/development.log @@ -19471,3 +19471,1064 @@ Processing PdfController#create (for ::1 at 2009-06-15 00:20:42) [GET] Book Load (0.3ms) SELECT * FROM `books` WHERE (`books`.`url` = 'the-fish') LIMIT 1 Completed in 131ms (View: 1, DB: 3) | 200 OK [http://localhost/the-fish/pdf] Streaming file public/pdfs/the-fish.pdf + SQL (0.1ms) SET NAMES 'utf8' + SQL (0.1ms) SET SQL_AUTO_IS_NULL=0 + + +Processing BooksController#edit (for ::1 at 2009-06-15 00:26:39) [GET] + Parameters: {"url"=>"the-fish"} + Book Columns (2.5ms) SHOW FIELDS FROM `books` + Book Load (0.3ms) SELECT * FROM `books` WHERE (`books`.`url` = 'the-fish') LIMIT 1 +Rendering template within layouts/application +Rendering books/edit +Completed in 13ms (View: 4, DB: 3) | 200 OK [http://localhost/the-fish/edit] + SQL (0.1ms) SET NAMES 'utf8' + SQL (0.1ms) SET SQL_AUTO_IS_NULL=0 + + +Processing BooksController#edit (for ::1 at 2009-06-15 00:26:55) [GET] + Parameters: {"url"=>"the-fish"} + Book Columns (2.6ms) SHOW FIELDS FROM `books` + Book Load (0.5ms) SELECT * FROM `books` WHERE (`books`.`url` = 'the-fish') LIMIT 1 +Rendering template within layouts/application +Rendering books/edit +Completed in 375ms (View: 365, DB: 3) | 200 OK [http://localhost/the-fish/edit] + SQL (0.1ms) SET NAMES 'utf8' + SQL (0.1ms) SET SQL_AUTO_IS_NULL=0 + + +Processing BooksController#update (for ::1 at 2009-06-15 00:27:56) [PUT] + Parameters: {"commit"=>"Save the book", "url"=>"the-fish", "authenticity_token"=>"mcg9+l1Riaj7+XW7clZKVzEHxWGn5yGPvg1aQ2ucJyY=", "book"=>{"text"=>"It was a cold and starry Night. The swans were thinking:\r\nAfter my graduation from high school I took a clerical job with a Buenos Aires insurance company. The job was extremely unpleasant and I found myself among some pretty annoying people with whom I had nothing in common, but as I was barely eighteen years old, I didn't much care.\r\n It was a ten-storey building served by four elevators. Three of them were assigned to the personnel in general, without regard to rank or position. But the fourth elevator — which was carpeted in red and had three mirrors and special décor — was reserved for the exclusive use of the company president, the members of the Board of Directors and the general manager. This meant that only they could ride the red elevator, but this would not prevent them from using the other three.\r\n I had never laid eyes either on the company president or the members of the Board of Directors. But, every once in a while, and always from a distance, I caught sight of the general manager, with whom, nevertheless, I had never exchanged a single word. He was a man of about fifty years of age, and had a \"noble\" and \"lordly\" bearing. I considered him to be a sort of cross between an old-time Argentine gentleman and a thoroughly incorruptible magistrate of some supreme court. His graying hair, his neatly-trimmed mustache, his conservative suits and his affable manners had made me — and I detested all my immediate bosses — feel some degree of fondness toward don Fernando. That is how they addressed him: don plus his given name and without the family name, a form of address somewhere between what might seem like familiarity and the veneration owed to a feudal lord.\r\n The offices occupied by don Fernando and his retinue took up the entire fifth floor of the building. Our section was on the third floor, but, since I was the least important employee, they would send me from one floor to another to run errands. On the tenth floor there were only some ill-tempered old men and ugly women who always seemed to be enraged about something or other. Up there a kind of dossier was kept active in which, five minutes before leaving the premises, I had to — without fail — leave a bundle of papers containing summaries of all the tasks carried out in our section that day.\r\nLorem ipsum."}} + Book Columns (2.2ms) SHOW FIELDS FROM `books` + Book Load (1.9ms) SELECT * FROM `books` WHERE (`books`.`url` = 'the-fish') LIMIT 1 + SQL (0.1ms) BEGIN + Book Update (0.4ms) UPDATE `books` SET `text` = 'It was a cold and starry Night. The swans were thinking:\r\nAfter my graduation from high school I took a clerical job with a Buenos Aires insurance company. The job was extremely unpleasant and I found myself among some pretty annoying people with whom I had nothing in common, but as I was barely eighteen years old, I didn\'t much care.\r\n It was a ten-storey building served by four elevators. Three of them were assigned to the personnel in general, without regard to rank or position. But the fourth elevator — which was carpeted in red and had three mirrors and special décor — was reserved for the exclusive use of the company president, the members of the Board of Directors and the general manager. This meant that only they could ride the red elevator, but this would not prevent them from using the other three.\r\n I had never laid eyes either on the company president or the members of the Board of Directors. But, every once in a while, and always from a distance, I caught sight of the general manager, with whom, nevertheless, I had never exchanged a single word. He was a man of about fifty years of age, and had a \"noble\" and \"lordly\" bearing. I considered him to be a sort of cross between an old-time Argentine gentleman and a thoroughly incorruptible magistrate of some supreme court. His graying hair, his neatly-trimmed mustache, his conservative suits and his affable manners had made me — and I detested all my immediate bosses — feel some degree of fondness toward don Fernando. That is how they addressed him: don plus his given name and without the family name, a form of address somewhere between what might seem like familiarity and the veneration owed to a feudal lord.\r\n The offices occupied by don Fernando and his retinue took up the entire fifth floor of the building. Our section was on the third floor, but, since I was the least important employee, they would send me from one floor to another to run errands. On the tenth floor there were only some ill-tempered old men and ugly women who always seemed to be enraged about something or other. Up there a kind of dossier was kept active in which, five minutes before leaving the premises, I had to — without fail — leave a bundle of papers containing summaries of all the tasks carried out in our section that day.\r\nLorem ipsum.', `updated_at` = '2009-06-14 22:27:56', `url` = 'the-fish-and-the-three-merry-men' WHERE `id` = 11 + SQL (26.7ms) COMMIT +Redirected to http://localhost:3000/the-fish-and-the-three-merry-men +Completed in 40ms (DB: 31) | 302 Found [http://localhost/the-fish/update] + SQL (0.1ms) SET NAMES 'utf8' + SQL (0.1ms) SET SQL_AUTO_IS_NULL=0 + + +Processing BooksController#show (for ::1 at 2009-06-15 00:27:56) [GET] + Parameters: {"url"=>"the-fish-and-the-three-merry-men"} + Book Columns (2.4ms) SHOW FIELDS FROM `books` + Book Load (0.3ms) SELECT * FROM `books` WHERE (`books`.`url` = 'the-fish-and-the-three-merry-men') LIMIT 1 +Rendering template within layouts/application +Rendering books/show +Completed in 12ms (View: 4, DB: 3) | 200 OK [http://localhost/the-fish-and-the-three-merry-men] + SQL (0.1ms) SET NAMES 'utf8' + SQL (0.1ms) SET SQL_AUTO_IS_NULL=0 + + +Processing BooksController#show (for ::1 at 2009-06-15 00:30:43) [GET] + Parameters: {"url"=>"the-fish-and-the-three-merry-men"} + Book Columns (2.9ms) SHOW FIELDS FROM `books` + Book Load (0.4ms) SELECT * FROM `books` WHERE (`books`.`url` = 'the-fish-and-the-three-merry-men') LIMIT 1 +Rendering template within layouts/application +Rendering books/show +Completed in 15ms (View: 6, DB: 3) | 200 OK [http://localhost/the-fish-and-the-three-merry-men] + SQL (0.1ms) SET NAMES 'utf8' + SQL (0.1ms) SET SQL_AUTO_IS_NULL=0 + + +Processing BooksController#edit (for ::1 at 2009-06-15 00:30:49) [GET] + Parameters: {"url"=>"the-fish-and-the-three-merry-men"} + Book Columns (1.9ms) SHOW FIELDS FROM `books` + Book Load (0.3ms) SELECT * FROM `books` WHERE (`books`.`url` = 'the-fish-and-the-three-merry-men') LIMIT 1 +Rendering template within layouts/application +Rendering books/edit +Completed in 17ms (View: 9, DB: 2) | 200 OK [http://localhost/the-fish-and-the-three-merry-men/edit] + SQL (0.1ms) SET NAMES 'utf8' + SQL (0.1ms) SET SQL_AUTO_IS_NULL=0 + + +Processing BooksController#edit (for ::1 at 2009-06-15 00:31:18) [GET] + Parameters: {"url"=>"the-fish-and-the-three-merry-men"} + Book Columns (2.7ms) SHOW FIELDS FROM `books` + Book Load (0.4ms) SELECT * FROM `books` WHERE (`books`.`url` = 'the-fish-and-the-three-merry-men') LIMIT 1 +Rendering template within layouts/application +Rendering books/edit +Completed in 17ms (View: 8, DB: 3) | 200 OK [http://localhost/the-fish-and-the-three-merry-men/edit] + SQL (0.1ms) SET NAMES 'utf8' + SQL (0.1ms) SET SQL_AUTO_IS_NULL=0 + + +Processing BooksController#edit (for ::1 at 2009-06-15 00:31:55) [GET] + Parameters: {"url"=>"the-fish-and-the-three-merry-men"} + Book Columns (2.4ms) SHOW FIELDS FROM `books` + Book Load (0.3ms) SELECT * FROM `books` WHERE (`books`.`url` = 'the-fish-and-the-three-merry-men') LIMIT 1 +Rendering template within layouts/application +Rendering books/edit +Completed in 21ms (View: 13, DB: 3) | 200 OK [http://localhost/the-fish-and-the-three-merry-men/edit] + SQL (0.1ms) SET NAMES 'utf8' + SQL (1.2ms) SET SQL_AUTO_IS_NULL=0 + + +Processing BooksController#edit (for ::1 at 2009-06-15 00:31:57) [GET] + Parameters: {"url"=>"the-fish-and-the-three-merry-men"} + Book Columns (2.4ms) SHOW FIELDS FROM `books` + Book Load (0.3ms) SELECT * FROM `books` WHERE (`books`.`url` = 'the-fish-and-the-three-merry-men') LIMIT 1 +Rendering template within layouts/application +Rendering books/edit +Completed in 13ms (View: 5, DB: 4) | 200 OK [http://localhost/the-fish-and-the-three-merry-men/edit] + SQL (0.1ms) SET NAMES 'utf8' + SQL (0.1ms) SET SQL_AUTO_IS_NULL=0 + + +Processing BooksController#edit (for ::1 at 2009-06-15 00:32:21) [GET] + Parameters: {"url"=>"the-fish"} + Book Columns (2.7ms) SHOW FIELDS FROM `books` + Book Load (1.2ms) SELECT * FROM `books` WHERE (`books`.`url` = 'the-fish') LIMIT 1 +Rendering template within layouts/application +Rendering books/edit + +ActionView::TemplateError (Called id for nil, which would mistakenly be 4 -- if you really wanted the id of nil, use object_id) on line #1 of app/views/books/edit.html.haml: +1: - form_for @book, :url => update_path do |f| +2: .page.title +3: = f.text_area :text +4: = f.submit 'Save the book' + + haml (2.0.9) lib/haml/helpers/action_view_mods.rb:171:in `form_for' + app/views/books/edit.html.haml:1:in `_run_haml_app47views47books47edit46html46haml' + haml (2.0.9) lib/haml/helpers/action_view_mods.rb:14:in `render' + haml (2.0.9) lib/haml/helpers/action_view_mods.rb:14:in `render' + haml (2.0.9) lib/sass/plugin/rails.rb:19:in `process' + /usr/local/ruby1.8.6/lib/ruby/1.8/webrick/httpserver.rb:104:in `service' + /usr/local/ruby1.8.6/lib/ruby/1.8/webrick/httpserver.rb:65:in `run' + /usr/local/ruby1.8.6/lib/ruby/1.8/webrick/server.rb:173:in `start_thread' + /usr/local/ruby1.8.6/lib/ruby/1.8/webrick/server.rb:162:in `start' + /usr/local/ruby1.8.6/lib/ruby/1.8/webrick/server.rb:162:in `start_thread' + /usr/local/ruby1.8.6/lib/ruby/1.8/webrick/server.rb:95:in `start' + /usr/local/ruby1.8.6/lib/ruby/1.8/webrick/server.rb:92:in `each' + /usr/local/ruby1.8.6/lib/ruby/1.8/webrick/server.rb:92:in `start' + /usr/local/ruby1.8.6/lib/ruby/1.8/webrick/server.rb:23:in `start' + /usr/local/ruby1.8.6/lib/ruby/1.8/webrick/server.rb:82:in `start' + +Rendered rescues/_trace (46.6ms) +Rendered rescues/_request_and_response (0.3ms) +Rendering rescues/layout (internal_server_error) + SQL (0.1ms) SET NAMES 'utf8' + SQL (0.1ms) SET SQL_AUTO_IS_NULL=0 + + +Processing BooksController#edit (for ::1 at 2009-06-15 00:32:22) [GET] + Parameters: {"url"=>"the-fish"} + Book Columns (2.0ms) SHOW FIELDS FROM `books` + Book Load (0.4ms) SELECT * FROM `books` WHERE (`books`.`url` = 'the-fish') LIMIT 1 +Rendering template within layouts/application +Rendering books/edit + +ActionView::TemplateError (Called id for nil, which would mistakenly be 4 -- if you really wanted the id of nil, use object_id) on line #1 of app/views/books/edit.html.haml: +1: - form_for @book, :url => update_path do |f| +2: .page.title +3: = f.text_area :text +4: = f.submit 'Save the book' + + haml (2.0.9) lib/haml/helpers/action_view_mods.rb:171:in `form_for' + app/views/books/edit.html.haml:1:in `_run_haml_app47views47books47edit46html46haml' + haml (2.0.9) lib/haml/helpers/action_view_mods.rb:14:in `render' + haml (2.0.9) lib/haml/helpers/action_view_mods.rb:14:in `render' + haml (2.0.9) lib/sass/plugin/rails.rb:19:in `process' + /usr/local/ruby1.8.6/lib/ruby/1.8/webrick/httpserver.rb:104:in `service' + /usr/local/ruby1.8.6/lib/ruby/1.8/webrick/httpserver.rb:65:in `run' + /usr/local/ruby1.8.6/lib/ruby/1.8/webrick/server.rb:173:in `start_thread' + /usr/local/ruby1.8.6/lib/ruby/1.8/webrick/server.rb:162:in `start' + /usr/local/ruby1.8.6/lib/ruby/1.8/webrick/server.rb:162:in `start_thread' + /usr/local/ruby1.8.6/lib/ruby/1.8/webrick/server.rb:95:in `start' + /usr/local/ruby1.8.6/lib/ruby/1.8/webrick/server.rb:92:in `each' + /usr/local/ruby1.8.6/lib/ruby/1.8/webrick/server.rb:92:in `start' + /usr/local/ruby1.8.6/lib/ruby/1.8/webrick/server.rb:23:in `start' + /usr/local/ruby1.8.6/lib/ruby/1.8/webrick/server.rb:82:in `start' + +Rendered rescues/_trace (142.6ms) +Rendered rescues/_request_and_response (0.3ms) +Rendering rescues/layout (internal_server_error) + SQL (0.1ms) SET NAMES 'utf8' + SQL (0.1ms) SET SQL_AUTO_IS_NULL=0 + + +Processing BooksController#edit (for ::1 at 2009-06-15 00:32:22) [GET] + Parameters: {"url"=>"the-fish"} + Book Columns (2.4ms) SHOW FIELDS FROM `books` + Book Load (3.2ms) SELECT * FROM `books` WHERE (`books`.`url` = 'the-fish') LIMIT 1 +Rendering template within layouts/application +Rendering books/edit + +ActionView::TemplateError (Called id for nil, which would mistakenly be 4 -- if you really wanted the id of nil, use object_id) on line #1 of app/views/books/edit.html.haml: +1: - form_for @book, :url => update_path do |f| +2: .page.title +3: = f.text_area :text +4: = f.submit 'Save the book' + + haml (2.0.9) lib/haml/helpers/action_view_mods.rb:171:in `form_for' + app/views/books/edit.html.haml:1:in `_run_haml_app47views47books47edit46html46haml' + haml (2.0.9) lib/haml/helpers/action_view_mods.rb:14:in `render' + haml (2.0.9) lib/haml/helpers/action_view_mods.rb:14:in `render' + haml (2.0.9) lib/sass/plugin/rails.rb:19:in `process' + /usr/local/ruby1.8.6/lib/ruby/1.8/webrick/httpserver.rb:104:in `service' + /usr/local/ruby1.8.6/lib/ruby/1.8/webrick/httpserver.rb:65:in `run' + /usr/local/ruby1.8.6/lib/ruby/1.8/webrick/server.rb:173:in `start_thread' + /usr/local/ruby1.8.6/lib/ruby/1.8/webrick/server.rb:162:in `start' + /usr/local/ruby1.8.6/lib/ruby/1.8/webrick/server.rb:162:in `start_thread' + /usr/local/ruby1.8.6/lib/ruby/1.8/webrick/server.rb:95:in `start' + /usr/local/ruby1.8.6/lib/ruby/1.8/webrick/server.rb:92:in `each' + /usr/local/ruby1.8.6/lib/ruby/1.8/webrick/server.rb:92:in `start' + /usr/local/ruby1.8.6/lib/ruby/1.8/webrick/server.rb:23:in `start' + /usr/local/ruby1.8.6/lib/ruby/1.8/webrick/server.rb:82:in `start' + +Rendered rescues/_trace (54.4ms) +Rendered rescues/_request_and_response (0.3ms) +Rendering rescues/layout (internal_server_error) + SQL (0.6ms) SET NAMES 'utf8' + SQL (0.1ms) SET SQL_AUTO_IS_NULL=0 + + +Processing BooksController#edit (for ::1 at 2009-06-15 00:32:23) [GET] + Parameters: {"url"=>"the-fish"} + Book Columns (2.4ms) SHOW FIELDS FROM `books` + Book Load (0.3ms) SELECT * FROM `books` WHERE (`books`.`url` = 'the-fish') LIMIT 1 +Rendering template within layouts/application +Rendering books/edit + +ActionView::TemplateError (Called id for nil, which would mistakenly be 4 -- if you really wanted the id of nil, use object_id) on line #1 of app/views/books/edit.html.haml: +1: - form_for @book, :url => update_path do |f| +2: .page.title +3: = f.text_area :text +4: = f.submit 'Save the book' + + haml (2.0.9) lib/haml/helpers/action_view_mods.rb:171:in `form_for' + app/views/books/edit.html.haml:1:in `_run_haml_app47views47books47edit46html46haml' + haml (2.0.9) lib/haml/helpers/action_view_mods.rb:14:in `render' + haml (2.0.9) lib/haml/helpers/action_view_mods.rb:14:in `render' + haml (2.0.9) lib/sass/plugin/rails.rb:19:in `process' + /usr/local/ruby1.8.6/lib/ruby/1.8/webrick/httpserver.rb:104:in `service' + /usr/local/ruby1.8.6/lib/ruby/1.8/webrick/httpserver.rb:65:in `run' + /usr/local/ruby1.8.6/lib/ruby/1.8/webrick/server.rb:173:in `start_thread' + /usr/local/ruby1.8.6/lib/ruby/1.8/webrick/server.rb:162:in `start' + /usr/local/ruby1.8.6/lib/ruby/1.8/webrick/server.rb:162:in `start_thread' + /usr/local/ruby1.8.6/lib/ruby/1.8/webrick/server.rb:95:in `start' + /usr/local/ruby1.8.6/lib/ruby/1.8/webrick/server.rb:92:in `each' + /usr/local/ruby1.8.6/lib/ruby/1.8/webrick/server.rb:92:in `start' + /usr/local/ruby1.8.6/lib/ruby/1.8/webrick/server.rb:23:in `start' + /usr/local/ruby1.8.6/lib/ruby/1.8/webrick/server.rb:82:in `start' + +Rendered rescues/_trace (147.9ms) +Rendered rescues/_request_and_response (0.4ms) +Rendering rescues/layout (internal_server_error) + SQL (0.2ms) SET NAMES 'utf8' + SQL (0.1ms) SET SQL_AUTO_IS_NULL=0 + + +Processing BooksController#edit (for ::1 at 2009-06-15 00:32:29) [GET] + Parameters: {"url"=>"the-fish"} + Book Columns (2.0ms) SHOW FIELDS FROM `books` + Book Load (0.2ms) SELECT * FROM `books` WHERE (`books`.`url` = 'the-fish') LIMIT 1 +Rendering template within layouts/application +Rendering books/edit + +ActionView::TemplateError (Called id for nil, which would mistakenly be 4 -- if you really wanted the id of nil, use object_id) on line #1 of app/views/books/edit.html.haml: +1: - form_for @book, :url => update_path do |f| +2: .page.title +3: = f.text_area :text +4: = f.submit 'Save the book' + + haml (2.0.9) lib/haml/helpers/action_view_mods.rb:171:in `form_for' + app/views/books/edit.html.haml:1:in `_run_haml_app47views47books47edit46html46haml' + haml (2.0.9) lib/haml/helpers/action_view_mods.rb:14:in `render' + haml (2.0.9) lib/haml/helpers/action_view_mods.rb:14:in `render' + haml (2.0.9) lib/sass/plugin/rails.rb:19:in `process' + /usr/local/ruby1.8.6/lib/ruby/1.8/webrick/httpserver.rb:104:in `service' + /usr/local/ruby1.8.6/lib/ruby/1.8/webrick/httpserver.rb:65:in `run' + /usr/local/ruby1.8.6/lib/ruby/1.8/webrick/server.rb:173:in `start_thread' + /usr/local/ruby1.8.6/lib/ruby/1.8/webrick/server.rb:162:in `start' + /usr/local/ruby1.8.6/lib/ruby/1.8/webrick/server.rb:162:in `start_thread' + /usr/local/ruby1.8.6/lib/ruby/1.8/webrick/server.rb:95:in `start' + /usr/local/ruby1.8.6/lib/ruby/1.8/webrick/server.rb:92:in `each' + /usr/local/ruby1.8.6/lib/ruby/1.8/webrick/server.rb:92:in `start' + /usr/local/ruby1.8.6/lib/ruby/1.8/webrick/server.rb:23:in `start' + /usr/local/ruby1.8.6/lib/ruby/1.8/webrick/server.rb:82:in `start' + +Rendered rescues/_trace (47.7ms) +Rendered rescues/_request_and_response (0.3ms) +Rendering rescues/layout (internal_server_error) + SQL (0.2ms) SET NAMES 'utf8' + SQL (0.1ms) SET SQL_AUTO_IS_NULL=0 + + +Processing BooksController#edit (for ::1 at 2009-06-15 00:32:52) [GET] + Parameters: {"url"=>"the-fish"} + Book Columns (2.3ms) SHOW FIELDS FROM `books` + Book Load (0.3ms) SELECT * FROM `books` WHERE (`books`.`url` = 'the-fish') LIMIT 1 +Rendering template within layouts/application +Rendering books/edit + +ActionView::TemplateError (Called id for nil, which would mistakenly be 4 -- if you really wanted the id of nil, use object_id) on line #1 of app/views/books/edit.html.haml: +1: - form_for @book, :url => update_path do |f| +2: .page.title +3: = f.text_area :text +4: = f.submit 'Save the book' + + haml (2.0.9) lib/haml/helpers/action_view_mods.rb:171:in `form_for' + app/views/books/edit.html.haml:1:in `_run_haml_app47views47books47edit46html46haml' + haml (2.0.9) lib/haml/helpers/action_view_mods.rb:14:in `render' + haml (2.0.9) lib/haml/helpers/action_view_mods.rb:14:in `render' + haml (2.0.9) lib/sass/plugin/rails.rb:19:in `process' + /usr/local/ruby1.8.6/lib/ruby/1.8/webrick/httpserver.rb:104:in `service' + /usr/local/ruby1.8.6/lib/ruby/1.8/webrick/httpserver.rb:65:in `run' + /usr/local/ruby1.8.6/lib/ruby/1.8/webrick/server.rb:173:in `start_thread' + /usr/local/ruby1.8.6/lib/ruby/1.8/webrick/server.rb:162:in `start' + /usr/local/ruby1.8.6/lib/ruby/1.8/webrick/server.rb:162:in `start_thread' + /usr/local/ruby1.8.6/lib/ruby/1.8/webrick/server.rb:95:in `start' + /usr/local/ruby1.8.6/lib/ruby/1.8/webrick/server.rb:92:in `each' + /usr/local/ruby1.8.6/lib/ruby/1.8/webrick/server.rb:92:in `start' + /usr/local/ruby1.8.6/lib/ruby/1.8/webrick/server.rb:23:in `start' + /usr/local/ruby1.8.6/lib/ruby/1.8/webrick/server.rb:82:in `start' + +Rendered rescues/_trace (46.1ms) +Rendered rescues/_request_and_response (0.3ms) +Rendering rescues/layout (internal_server_error) + SQL (0.1ms) SET NAMES 'utf8' + SQL (0.1ms) SET SQL_AUTO_IS_NULL=0 + + +Processing BooksController#edit (for ::1 at 2009-06-15 00:32:54) [GET] + Parameters: {"url"=>"the-fish"} + Book Columns (2.6ms) SHOW FIELDS FROM `books` + Book Load (0.3ms) SELECT * FROM `books` WHERE (`books`.`url` = 'the-fish') LIMIT 1 +Rendering template within layouts/application +Rendering books/edit + +ActionView::TemplateError (Called id for nil, which would mistakenly be 4 -- if you really wanted the id of nil, use object_id) on line #1 of app/views/books/edit.html.haml: +1: - form_for @book, :url => update_path do |f| +2: .page.title +3: = f.text_area :text +4: = f.submit 'Save the book' + + haml (2.0.9) lib/haml/helpers/action_view_mods.rb:171:in `form_for' + app/views/books/edit.html.haml:1:in `_run_haml_app47views47books47edit46html46haml' + haml (2.0.9) lib/haml/helpers/action_view_mods.rb:14:in `render' + haml (2.0.9) lib/haml/helpers/action_view_mods.rb:14:in `render' + haml (2.0.9) lib/sass/plugin/rails.rb:19:in `process' + /usr/local/ruby1.8.6/lib/ruby/1.8/webrick/httpserver.rb:104:in `service' + /usr/local/ruby1.8.6/lib/ruby/1.8/webrick/httpserver.rb:65:in `run' + /usr/local/ruby1.8.6/lib/ruby/1.8/webrick/server.rb:173:in `start_thread' + /usr/local/ruby1.8.6/lib/ruby/1.8/webrick/server.rb:162:in `start' + /usr/local/ruby1.8.6/lib/ruby/1.8/webrick/server.rb:162:in `start_thread' + /usr/local/ruby1.8.6/lib/ruby/1.8/webrick/server.rb:95:in `start' + /usr/local/ruby1.8.6/lib/ruby/1.8/webrick/server.rb:92:in `each' + /usr/local/ruby1.8.6/lib/ruby/1.8/webrick/server.rb:92:in `start' + /usr/local/ruby1.8.6/lib/ruby/1.8/webrick/server.rb:23:in `start' + /usr/local/ruby1.8.6/lib/ruby/1.8/webrick/server.rb:82:in `start' + +Rendered rescues/_trace (46.1ms) +Rendered rescues/_request_and_response (0.3ms) +Rendering rescues/layout (internal_server_error) + SQL (0.1ms) SET NAMES 'utf8' + SQL (0.1ms) SET SQL_AUTO_IS_NULL=0 + + +Processing BooksController#edit (for ::1 at 2009-06-15 00:33:11) [GET] + Parameters: {"url"=>"the-fish-and-the-three-merry-men"} + Book Columns (2.0ms) SHOW FIELDS FROM `books` + Book Load (0.3ms) SELECT * FROM `books` WHERE (`books`.`url` = 'the-fish-and-the-three-merry-men') LIMIT 1 +Rendering template within layouts/application +Rendering books/edit +Completed in 117ms (View: 108, DB: 3) | 200 OK [http://localhost/the-fish-and-the-three-merry-men/edit] + SQL (0.1ms) SET NAMES 'utf8' + SQL (0.1ms) SET SQL_AUTO_IS_NULL=0 + + +Processing BooksController#edit (for ::1 at 2009-06-15 00:33:23) [GET] + Parameters: {"url"=>"the-fish-and-the-three-merry-men"} + Book Columns (1.9ms) SHOW FIELDS FROM `books` + Book Load (0.3ms) SELECT * FROM `books` WHERE (`books`.`url` = 'the-fish-and-the-three-merry-men') LIMIT 1 +Rendering template within layouts/application +Rendering books/edit +Completed in 13ms (View: 5, DB: 2) | 200 OK [http://localhost/the-fish-and-the-three-merry-men/edit] + SQL (0.2ms) SET NAMES 'utf8' + SQL (0.1ms) SET SQL_AUTO_IS_NULL=0 + + +Processing BooksController#edit (for ::1 at 2009-06-15 00:33:24) [GET] + Parameters: {"url"=>"the-fish-and-the-three-merry-men"} + Book Columns (2.7ms) SHOW FIELDS FROM `books` + Book Load (0.4ms) SELECT * FROM `books` WHERE (`books`.`url` = 'the-fish-and-the-three-merry-men') LIMIT 1 +Rendering template within layouts/application +Rendering books/edit +Completed in 16ms (View: 7, DB: 3) | 200 OK [http://localhost/the-fish-and-the-three-merry-men/edit] + SQL (0.1ms) SET NAMES 'utf8' + SQL (0.1ms) SET SQL_AUTO_IS_NULL=0 + + +Processing BooksController#edit (for ::1 at 2009-06-15 00:34:00) [GET] + Parameters: {"url"=>"the-fish-and-the-three-merry-men"} + Book Columns (3.2ms) SHOW FIELDS FROM `books` + Book Load (2.5ms) SELECT * FROM `books` WHERE (`books`.`url` = 'the-fish-and-the-three-merry-men') LIMIT 1 +Rendering template within layouts/application +Rendering books/edit +Completed in 18ms (View: 5, DB: 6) | 200 OK [http://localhost/the-fish-and-the-three-merry-men/edit] + SQL (0.1ms) SET NAMES 'utf8' + SQL (0.1ms) SET SQL_AUTO_IS_NULL=0 + + +Processing BooksController#edit (for ::1 at 2009-06-15 00:34:00) [GET] + Parameters: {"url"=>"the-fish-and-the-three-merry-men"} + Book Columns (2.6ms) SHOW FIELDS FROM `books` + Book Load (0.3ms) SELECT * FROM `books` WHERE (`books`.`url` = 'the-fish-and-the-three-merry-men') LIMIT 1 +Rendering template within layouts/application +Rendering books/edit +Completed in 14ms (View: 5, DB: 3) | 200 OK [http://localhost/the-fish-and-the-three-merry-men/edit] + SQL (0.1ms) SET NAMES 'utf8' + SQL (0.1ms) SET SQL_AUTO_IS_NULL=0 + + +Processing BooksController#edit (for ::1 at 2009-06-15 00:34:01) [GET] + Parameters: {"url"=>"the-fish-and-the-three-merry-men"} + Book Columns (2.7ms) SHOW FIELDS FROM `books` + Book Load (1.8ms) SELECT * FROM `books` WHERE (`books`.`url` = 'the-fish-and-the-three-merry-men') LIMIT 1 +Rendering template within layouts/application +Rendering books/edit +Completed in 19ms (View: 7, DB: 5) | 200 OK [http://localhost/the-fish-and-the-three-merry-men/edit] + SQL (0.1ms) SET NAMES 'utf8' + SQL (0.1ms) SET SQL_AUTO_IS_NULL=0 + + +Processing BooksController#edit (for ::1 at 2009-06-15 00:34:16) [GET] + Parameters: {"url"=>"the-fish-and-the-three-merry-men"} + Book Columns (2.4ms) SHOW FIELDS FROM `books` + Book Load (0.5ms) SELECT * FROM `books` WHERE (`books`.`url` = 'the-fish-and-the-three-merry-men') LIMIT 1 +Rendering template within layouts/application +Rendering books/edit +Completed in 17ms (View: 5, DB: 3) | 200 OK [http://localhost/the-fish-and-the-three-merry-men/edit] + SQL (0.1ms) SET NAMES 'utf8' + SQL (0.1ms) SET SQL_AUTO_IS_NULL=0 + + +Processing BooksController#edit (for ::1 at 2009-06-15 00:34:17) [GET] + Parameters: {"url"=>"the-fish-and-the-three-merry-men"} + Book Columns (2.0ms) SHOW FIELDS FROM `books` + Book Load (0.3ms) SELECT * FROM `books` WHERE (`books`.`url` = 'the-fish-and-the-three-merry-men') LIMIT 1 +Rendering template within layouts/application +Rendering books/edit +Completed in 14ms (View: 5, DB: 3) | 200 OK [http://localhost/the-fish-and-the-three-merry-men/edit] + SQL (0.1ms) SET NAMES 'utf8' + SQL (0.3ms) SET SQL_AUTO_IS_NULL=0 + + +Processing BooksController#edit (for ::1 at 2009-06-15 00:34:21) [GET] + Parameters: {"url"=>"the-fish-and-the-three-merry-men"} + Book Columns (1.9ms) SHOW FIELDS FROM `books` + Book Load (0.3ms) SELECT * FROM `books` WHERE (`books`.`url` = 'the-fish-and-the-three-merry-men') LIMIT 1 +Rendering template within layouts/application +Rendering books/edit +Completed in 13ms (View: 5, DB: 3) | 200 OK [http://localhost/the-fish-and-the-three-merry-men/edit] + SQL (0.2ms) SET NAMES 'utf8' + SQL (0.1ms) SET SQL_AUTO_IS_NULL=0 + + +Processing BooksController#edit (for ::1 at 2009-06-15 00:34:28) [GET] + Parameters: {"url"=>"the-fish-and-the-three-merry-men"} + Book Columns (1.9ms) SHOW FIELDS FROM `books` + Book Load (0.3ms) SELECT * FROM `books` WHERE (`books`.`url` = 'the-fish-and-the-three-merry-men') LIMIT 1 +Rendering template within layouts/application +Rendering books/edit +Completed in 14ms (View: 6, DB: 3) | 200 OK [http://localhost/the-fish-and-the-three-merry-men/edit] + SQL (0.1ms) SET NAMES 'utf8' + SQL (0.1ms) SET SQL_AUTO_IS_NULL=0 + + +Processing BooksController#edit (for ::1 at 2009-06-15 00:34:59) [GET] + Parameters: {"url"=>"the-fish-and-the-three-merry-men"} + Book Columns (3.1ms) SHOW FIELDS FROM `books` + Book Load (0.3ms) SELECT * FROM `books` WHERE (`books`.`url` = 'the-fish-and-the-three-merry-men') LIMIT 1 +Rendering template within layouts/application +Rendering books/edit +Completed in 15ms (View: 5, DB: 4) | 200 OK [http://localhost/the-fish-and-the-three-merry-men/edit] + SQL (0.1ms) SET NAMES 'utf8' + SQL (0.1ms) SET SQL_AUTO_IS_NULL=0 + + +Processing BooksController#update (for ::1 at 2009-06-15 00:35:27) [PUT] + Parameters: {"commit"=>"Save the book", "url"=>"the-fish-and-the-three-merry-men", "authenticity_token"=>"mcg9+l1Riaj7+XW7clZKVzEHxWGn5yGPvg1aQ2ucJyY=", "book"=>{"text"=>"It was a cold and starry Night. The swans were thinking:\r\nAfter my graduation from high school I took a clerical job with a Buenos Aires insurance company. The job was extremely unpleasant and I found myself among some pretty annoying people with whom I had nothing in common, but as I was barely eighteen years old, I didn't much care.\r\n It was a ten-storey building served by four elevators. Three of them were assigned to the personnel in general, without regard to rank or position. But the fourth elevator — which was carpeted in red and had three mirrors and special décor — was reserved for the exclusive use of the company president, the members of the Board of Directors and the general manager. This meant that only they could ride the red elevator, but this would not prevent them from using the other three.\r\n I had never laid eyes either on the company president or the members of the Board of Directors. But, every once in a while, and always from a distance, I caught sight of the general manager, with whom, nevertheless, I had never exchanged a single word. He was a man of about fifty years of age, and had a \"noble\" and \"lordly\" bearing. I considered him to be a sort of cross between an old-time Argentine gentleman and a thoroughly incorruptible magistrate of some supreme court. His graying hair, his neatly-trimmed mustache, his conservative suits and his affable manners had made me — and I detested all my immediate bosses — feel some degree of fondness toward don Fernando. That is how they addressed him: don plus his given name and without the family name, a form of address somewhere between what might seem like familiarity and the veneration owed to a feudal lord.\r\n The offices occupied by don Fernando and his retinue took up the entire fifth floor of the building. Our section was on the third floor, but, since I was the least important employee, they would send me from one floor to another to run errands. On the tenth floor there were only some ill-tempered old men and ugly women who always seemed to be enraged about something or other. Up there a kind of dossier was kept active in which, five minutes before leaving the premises, I had to — without fail — leave a bundle of papers containing summaries of all the tasks carried out in our section that day.\r\nLorem ipsum."}} + Book Columns (1.9ms) SHOW FIELDS FROM `books` + Book Load (0.3ms) SELECT * FROM `books` WHERE (`books`.`url` = 'the-fish-and-the-three-merry-men') LIMIT 1 + SQL (0.1ms) BEGIN + SQL (0.1ms) COMMIT +Redirected to http://localhost:3000/the-fish-and-the-three-merry-men +Completed in 11ms (DB: 3) | 302 Found [http://localhost/the-fish-and-the-three-merry-men/update] + SQL (0.1ms) SET NAMES 'utf8' + SQL (0.1ms) SET SQL_AUTO_IS_NULL=0 + + +Processing BooksController#show (for ::1 at 2009-06-15 00:35:27) [GET] + Parameters: {"url"=>"the-fish-and-the-three-merry-men"} + Book Columns (2.1ms) SHOW FIELDS FROM `books` + Book Load (0.4ms) SELECT * FROM `books` WHERE (`books`.`url` = 'the-fish-and-the-three-merry-men') LIMIT 1 +Rendering template within layouts/application +Rendering books/show +Completed in 12ms (View: 4, DB: 3) | 200 OK [http://localhost/the-fish-and-the-three-merry-men] + SQL (0.1ms) SET NAMES 'utf8' + SQL (0.1ms) SET SQL_AUTO_IS_NULL=0 + + +Processing BooksController#edit (for ::1 at 2009-06-15 00:36:17) [GET] + Parameters: {"url"=>"the-fish-and-the-three-merry-men"} + Book Columns (1.9ms) SHOW FIELDS FROM `books` + Book Load (0.3ms) SELECT * FROM `books` WHERE (`books`.`url` = 'the-fish-and-the-three-merry-men') LIMIT 1 +Rendering template within layouts/application +Rendering books/edit +Completed in 13ms (View: 5, DB: 2) | 200 OK [http://localhost/the-fish-and-the-three-merry-men/edit] + SQL (0.1ms) SET NAMES 'utf8' + SQL (0.1ms) SET SQL_AUTO_IS_NULL=0 + + +Processing BooksController#edit (for ::1 at 2009-06-15 00:36:19) [GET] + Parameters: {"url"=>"the-fish-and-the-three-merry-men"} + Book Columns (2.0ms) SHOW FIELDS FROM `books` + Book Load (0.3ms) SELECT * FROM `books` WHERE (`books`.`url` = 'the-fish-and-the-three-merry-men') LIMIT 1 +Rendering template within layouts/application +Rendering books/edit +Completed in 13ms (View: 5, DB: 3) | 200 OK [http://localhost/the-fish-and-the-three-merry-men/edit] + SQL (0.2ms) SET NAMES 'utf8' + SQL (0.1ms) SET SQL_AUTO_IS_NULL=0 + + +Processing BooksController#show (for ::1 at 2009-06-15 00:36:29) [GET] + Parameters: {"url"=>"the-fish-and-the-three-merry-men"} + Book Columns (2.4ms) SHOW FIELDS FROM `books` + Book Load (1.2ms) SELECT * FROM `books` WHERE (`books`.`url` = 'the-fish-and-the-three-merry-men') LIMIT 1 +Rendering template within layouts/application +Rendering books/show +Completed in 13ms (View: 4, DB: 4) | 200 OK [http://localhost/the-fish-and-the-three-merry-men] + SQL (0.1ms) SET NAMES 'utf8' + SQL (0.1ms) SET SQL_AUTO_IS_NULL=0 + + +Processing BooksController#show (for ::1 at 2009-06-15 00:39:32) [GET] + Parameters: {"url"=>"the-fish-and-the-three-merry-men"} + Book Columns (2.2ms) SHOW FIELDS FROM `books` + Book Load (0.3ms) SELECT * FROM `books` WHERE (`books`.`url` = 'the-fish-and-the-three-merry-men') LIMIT 1 +Rendering template within layouts/application +Rendering books/show +Completed in 18ms (View: 10, DB: 3) | 200 OK [http://localhost/the-fish-and-the-three-merry-men] + SQL (0.2ms) SET NAMES 'utf8' + SQL (0.1ms) SET SQL_AUTO_IS_NULL=0 + + +Processing BooksController#show (for ::1 at 2009-06-15 00:42:09) [GET] + Parameters: {"url"=>"the-fish-and-the-three-merry-men"} + Book Columns (3.0ms) SHOW FIELDS FROM `books` + Book Load (0.3ms) SELECT * FROM `books` WHERE (`books`.`url` = 'the-fish-and-the-three-merry-men') LIMIT 1 +Rendering template within layouts/application +Rendering books/show +Completed in 20ms (View: 10, DB: 4) | 200 OK [http://localhost/the-fish-and-the-three-merry-men] + SQL (0.2ms) SET NAMES 'utf8' + SQL (0.1ms) SET SQL_AUTO_IS_NULL=0 + + +Processing BooksController#show (for ::1 at 2009-06-15 00:42:59) [GET] + Parameters: {"url"=>"the-fish-and-the-three-merry-men"} + Book Columns (2.9ms) SHOW FIELDS FROM `books` + Book Load (1.3ms) SELECT * FROM `books` WHERE (`books`.`url` = 'the-fish-and-the-three-merry-men') LIMIT 1 +Rendering template within layouts/application +Rendering books/show +Completed in 14ms (View: 4, DB: 4) | 200 OK [http://localhost/the-fish-and-the-three-merry-men] + SQL (0.1ms) SET NAMES 'utf8' + SQL (0.1ms) SET SQL_AUTO_IS_NULL=0 + + +Processing BooksController#show (for ::1 at 2009-06-15 00:44:27) [GET] + Parameters: {"url"=>"the-fish-and-the-three-merry-men"} + Book Columns (2.0ms) SHOW FIELDS FROM `books` + Book Load (0.3ms) SELECT * FROM `books` WHERE (`books`.`url` = 'the-fish-and-the-three-merry-men') LIMIT 1 +Rendering template within layouts/application +Rendering books/show +Completed in 12ms (View: 4, DB: 3) | 200 OK [http://localhost/the-fish-and-the-three-merry-men] + SQL (0.1ms) SET NAMES 'utf8' + SQL (0.1ms) SET SQL_AUTO_IS_NULL=0 + + +Processing BooksController#show (for ::1 at 2009-06-15 00:44:41) [GET] + Parameters: {"url"=>"the-fish-and-the-three-merry-men"} + Book Columns (2.8ms) SHOW FIELDS FROM `books` + Book Load (1.3ms) SELECT * FROM `books` WHERE (`books`.`url` = 'the-fish-and-the-three-merry-men') LIMIT 1 +Rendering template within layouts/application +Rendering books/show +Completed in 14ms (View: 4, DB: 4) | 200 OK [http://localhost/the-fish-and-the-three-merry-men] + SQL (0.1ms) SET NAMES 'utf8' + SQL (0.1ms) SET SQL_AUTO_IS_NULL=0 + + +Processing BooksController#edit (for ::1 at 2009-06-15 00:45:19) [GET] + Parameters: {"url"=>"the-fish-and-the-three-merry-men"} + Book Columns (1.9ms) SHOW FIELDS FROM `books` + Book Load (0.3ms) SELECT * FROM `books` WHERE (`books`.`url` = 'the-fish-and-the-three-merry-men') LIMIT 1 +Rendering template within layouts/application +Rendering books/edit +Completed in 13ms (View: 5, DB: 2) | 200 OK [http://localhost/the-fish-and-the-three-merry-men/edit] + SQL (0.1ms) SET NAMES 'utf8' + SQL (0.1ms) SET SQL_AUTO_IS_NULL=0 + + +Processing BooksController#update (for ::1 at 2009-06-15 00:45:39) [PUT] + Parameters: {"commit"=>"Save the book", "url"=>"the-fish-and-the-three-merry-men", "authenticity_token"=>"mcg9+l1Riaj7+XW7clZKVzEHxWGn5yGPvg1aQ2ucJyY=", "book"=>{"text"=>"It was a cold and starry Night. The swans were thinking:\r\nAfter my graduation from high school I took a clerical job with a Buenos Aires insurance company. The job was extremely unpleasant and I found myself among some pretty annoying people with whom I had nothing in common, but as I was barely eighteen years old, I didn't much care.\r\n It was a ten-storey building served by four elevators. Three of them were assigned to the personnel in general, without regard to rank or position. But the fourth elevator — which was carpeted in red and had three mirrors and special décor — was reserved for the exclusive use of the company president, the members of the Board of Directors and the general manager. This meant that only they could ride the red elevator, but this would not prevent them from using the other three.\r\n I had never laid eyes either on the company president or the members of the Board of Directors. But, every once in a while, and always from a distance, I caught sight of the general manager, with whom, nevertheless, I had never exchanged a single word. He was a man of about fifty years of age, and had a \"noble\" and \"lordly\" bearing. I considered him to be a sort of cross between an old-time Argentine gentleman and a thoroughly incorruptible magistrate of some supreme court. His graying hair, his neatly-trimmed mustache, his conservative suits and his affable manners had made me — and I detested all my immediate bosses — feel some degree of fondness toward don Fernando. That is how they addressed him: don plus his given name and without the family name, a form of address somewhere between what might seem like familiarity and the veneration owed to a feudal lord.\r\n The offices occupied by don Fernando and his retinue took up the entire fifth floor of the building. Our section was on the third floor, but, since I was the least important employee, they would send me from one floor to another to run errands. On the tenth floor there were only some ill-tempered old men and ugly women who always seemed to be enraged about something or other. Up there a kind of dossier was kept active in which, five minutes before leaving the premises, I had to — without fail — leave a bundle of papers containing summaries of all the tasks carried out in our section that day.\r\nLorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum."}} + Book Columns (5.0ms) SHOW FIELDS FROM `books` + Book Load (4.1ms) SELECT * FROM `books` WHERE (`books`.`url` = 'the-fish-and-the-three-merry-men') LIMIT 1 + SQL (1.7ms) BEGIN + Book Update (0.6ms) UPDATE `books` SET `text` = 'It was a cold and starry Night. The swans were thinking:\r\nAfter my graduation from high school I took a clerical job with a Buenos Aires insurance company. The job was extremely unpleasant and I found myself among some pretty annoying people with whom I had nothing in common, but as I was barely eighteen years old, I didn\'t much care.\r\n It was a ten-storey building served by four elevators. Three of them were assigned to the personnel in general, without regard to rank or position. But the fourth elevator — which was carpeted in red and had three mirrors and special décor — was reserved for the exclusive use of the company president, the members of the Board of Directors and the general manager. This meant that only they could ride the red elevator, but this would not prevent them from using the other three.\r\n I had never laid eyes either on the company president or the members of the Board of Directors. But, every once in a while, and always from a distance, I caught sight of the general manager, with whom, nevertheless, I had never exchanged a single word. He was a man of about fifty years of age, and had a \"noble\" and \"lordly\" bearing. I considered him to be a sort of cross between an old-time Argentine gentleman and a thoroughly incorruptible magistrate of some supreme court. His graying hair, his neatly-trimmed mustache, his conservative suits and his affable manners had made me — and I detested all my immediate bosses — feel some degree of fondness toward don Fernando. That is how they addressed him: don plus his given name and without the family name, a form of address somewhere between what might seem like familiarity and the veneration owed to a feudal lord.\r\n The offices occupied by don Fernando and his retinue took up the entire fifth floor of the building. Our section was on the third floor, but, since I was the least important employee, they would send me from one floor to another to run errands. On the tenth floor there were only some ill-tempered old men and ugly women who always seemed to be enraged about something or other. Up there a kind of dossier was kept active in which, five minutes before leaving the premises, I had to — without fail — leave a bundle of papers containing summaries of all the tasks carried out in our section that day.\r\nLorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.', `updated_at` = '2009-06-14 22:45:39' WHERE `id` = 11 + SQL (22.0ms) COMMIT +Redirected to http://localhost:3000/the-fish-and-the-three-merry-men +Completed in 45ms (DB: 34) | 302 Found [http://localhost/the-fish-and-the-three-merry-men/update] + SQL (0.1ms) SET NAMES 'utf8' + SQL (0.1ms) SET SQL_AUTO_IS_NULL=0 + + +Processing BooksController#show (for ::1 at 2009-06-15 00:45:39) [GET] + Parameters: {"url"=>"the-fish-and-the-three-merry-men"} + Book Columns (1.8ms) SHOW FIELDS FROM `books` + Book Load (0.4ms) SELECT * FROM `books` WHERE (`books`.`url` = 'the-fish-and-the-three-merry-men') LIMIT 1 +Rendering template within layouts/application +Rendering books/show +Completed in 107ms (View: 5, DB: 2) | 200 OK [http://localhost/the-fish-and-the-three-merry-men] + SQL (0.1ms) SET NAMES 'utf8' + SQL (0.4ms) SET SQL_AUTO_IS_NULL=0 + + +Processing BooksController#update (for ::1 at 2009-06-15 00:45:56) [PUT] + Parameters: {"commit"=>"Save the book", "url"=>"the-fish-and-the-three-merry-men", "authenticity_token"=>"mcg9+l1Riaj7+XW7clZKVzEHxWGn5yGPvg1aQ2ucJyY=", "book"=>{"text"=>"It was a cold and starry Night. The swans were thinking:\r\nAfter my graduation from high school I took a clerical job with a Buenos Aires insurance company. The job was extremely unpleasant and I found myself among some pretty annoying people with whom I had nothing in common, but as I was barely eighteen years old, I didn't much care.\r\n It was a ten-storey building served by four elevators. Three of them were assigned to the personnel in general, without regard to rank or position. But the fourth elevator — which was carpeted in red and had three mirrors and special décor — was reserved for the exclusive use of the company president, the members of the Board of Directors and the general manager. This meant that only they could ride the red elevator, but this would not prevent them from using the other three.\r\n I had never laid eyes either on the company president or the members of the Board of Directors. But, every once in a while, and always from a distance, I caught sight of the general manager, with whom, nevertheless, I had never exchanged a single word. He was a man of about fifty years of age, and had a \"noble\" and \"lordly\" bearing. I considered him to be a sort of cross between an old-time Argentine gentleman and a thoroughly incorruptible magistrate of some supreme court. His graying hair, his neatly-trimmed mustache, his conservative suits and his affable manners had made me — and I detested all my immediate bosses — feel some degree of fondness toward don Fernando. That is how they addressed him: don plus his given name and without the family name, a form of address somewhere between what might seem like familiarity and the veneration owed to a feudal lord.\r\n The offices occupied by don Fernando and his retinue took up the entire fifth floor of the building. Our section was on the third floor, but, since I was the least important employee, they would send me from one floor to another to run errands. On the tenth floor there were only some ill-tempered old men and ugly women who always seemed to be enraged about something or other. Up there a kind of dossier was kept active in which, five minutes before leaving the premises, I had to — without fail — leave a bundle of papers containing summaries of all the tasks carried out in our section that day.\r\nLorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum."}} + Book Columns (1.8ms) SHOW FIELDS FROM `books` + Book Load (0.4ms) SELECT * FROM `books` WHERE (`books`.`url` = 'the-fish-and-the-three-merry-men') LIMIT 1 + SQL (0.1ms) BEGIN + Book Update (0.7ms) UPDATE `books` SET `text` = 'It was a cold and starry Night. The swans were thinking:\r\nAfter my graduation from high school I took a clerical job with a Buenos Aires insurance company. The job was extremely unpleasant and I found myself among some pretty annoying people with whom I had nothing in common, but as I was barely eighteen years old, I didn\'t much care.\r\n It was a ten-storey building served by four elevators. Three of them were assigned to the personnel in general, without regard to rank or position. But the fourth elevator — which was carpeted in red and had three mirrors and special décor — was reserved for the exclusive use of the company president, the members of the Board of Directors and the general manager. This meant that only they could ride the red elevator, but this would not prevent them from using the other three.\r\n I had never laid eyes either on the company president or the members of the Board of Directors. But, every once in a while, and always from a distance, I caught sight of the general manager, with whom, nevertheless, I had never exchanged a single word. He was a man of about fifty years of age, and had a \"noble\" and \"lordly\" bearing. I considered him to be a sort of cross between an old-time Argentine gentleman and a thoroughly incorruptible magistrate of some supreme court. His graying hair, his neatly-trimmed mustache, his conservative suits and his affable manners had made me — and I detested all my immediate bosses — feel some degree of fondness toward don Fernando. That is how they addressed him: don plus his given name and without the family name, a form of address somewhere between what might seem like familiarity and the veneration owed to a feudal lord.\r\n The offices occupied by don Fernando and his retinue took up the entire fifth floor of the building. Our section was on the third floor, but, since I was the least important employee, they would send me from one floor to another to run errands. On the tenth floor there were only some ill-tempered old men and ugly women who always seemed to be enraged about something or other. Up there a kind of dossier was kept active in which, five minutes before leaving the premises, I had to — without fail — leave a bundle of papers containing summaries of all the tasks carried out in our section that day.\r\nLorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.', `updated_at` = '2009-06-14 22:45:56' WHERE `id` = 11 + SQL (38.6ms) COMMIT +Redirected to http://localhost:3000/the-fish-and-the-three-merry-men +Completed in 51ms (DB: 42) | 302 Found [http://localhost/the-fish-and-the-three-merry-men/update] + SQL (0.1ms) SET NAMES 'utf8' + SQL (0.1ms) SET SQL_AUTO_IS_NULL=0 + + +Processing BooksController#show (for ::1 at 2009-06-15 00:45:56) [GET] + Parameters: {"url"=>"the-fish-and-the-three-merry-men"} + Book Columns (2.9ms) SHOW FIELDS FROM `books` + Book Load (0.3ms) SELECT * FROM `books` WHERE (`books`.`url` = 'the-fish-and-the-three-merry-men') LIMIT 1 +Rendering template within layouts/application +Rendering books/show +Completed in 13ms (View: 4, DB: 3) | 200 OK [http://localhost/the-fish-and-the-three-merry-men] + SQL (0.2ms) SET NAMES 'utf8' + SQL (0.1ms) SET SQL_AUTO_IS_NULL=0 + + +Processing BooksController#show (for ::1 at 2009-06-15 00:46:50) [GET] + Parameters: {"url"=>"the-fish-and-the-three-merry-men"} + Book Columns (2.5ms) SHOW FIELDS FROM `books` + Book Load (0.4ms) SELECT * FROM `books` WHERE (`books`.`url` = 'the-fish-and-the-three-merry-men') LIMIT 1 +Rendering template within layouts/application +Rendering books/show +Completed in 18ms (View: 9, DB: 3) | 200 OK [http://localhost/the-fish-and-the-three-merry-men] + SQL (0.1ms) SET NAMES 'utf8' + SQL (0.1ms) SET SQL_AUTO_IS_NULL=0 + + +Processing BooksController#show (for ::1 at 2009-06-15 00:47:06) [GET] + Parameters: {"url"=>"the-fish-and-the-three-merry-men"} + Book Columns (2.5ms) SHOW FIELDS FROM `books` + Book Load (0.3ms) SELECT * FROM `books` WHERE (`books`.`url` = 'the-fish-and-the-three-merry-men') LIMIT 1 +Rendering template within layouts/application +Rendering books/show +Completed in 21ms (View: 11, DB: 3) | 200 OK [http://localhost/the-fish-and-the-three-merry-men] + SQL (2.0ms) SET NAMES 'utf8' + SQL (0.1ms) SET SQL_AUTO_IS_NULL=0 + + +Processing BooksController#show (for ::1 at 2009-06-15 00:47:19) [GET] + Parameters: {"url"=>"the-fish-and-the-three-merry-men"} + Book Columns (3.1ms) SHOW FIELDS FROM `books` + Book Load (0.4ms) SELECT * FROM `books` WHERE (`books`.`url` = 'the-fish-and-the-three-merry-men') LIMIT 1 +Rendering template within layouts/application +Rendering books/show +Completed in 22ms (View: 13, DB: 6) | 200 OK [http://localhost/the-fish-and-the-three-merry-men] + SQL (0.3ms) SET NAMES 'utf8' + SQL (0.1ms) SET SQL_AUTO_IS_NULL=0 + + +Processing BooksController#show (for ::1 at 2009-06-15 00:48:06) [GET] + Parameters: {"url"=>"the-fish-and-the-three-merry-men"} + Book Columns (2.0ms) SHOW FIELDS FROM `books` + Book Load (0.3ms) SELECT * FROM `books` WHERE (`books`.`url` = 'the-fish-and-the-three-merry-men') LIMIT 1 +Rendering template within layouts/application +Rendering books/show +Completed in 17ms (View: 9, DB: 3) | 200 OK [http://localhost/the-fish-and-the-three-merry-men] + SQL (0.1ms) SET NAMES 'utf8' + SQL (0.1ms) SET SQL_AUTO_IS_NULL=0 + + +Processing PdfController#create (for ::1 at 2009-06-15 00:49:21) [GET] + Parameters: {"url"=>"the-fish-and-the-three-merry-men"} + Book Columns (2.5ms) SHOW FIELDS FROM `books` + Book Load (0.3ms) SELECT * FROM `books` WHERE (`books`.`url` = 'the-fish-and-the-three-merry-men') LIMIT 1 +Completed in 168ms (View: 1, DB: 3) | 200 OK [http://localhost/the-fish-and-the-three-merry-men/pdf] +Streaming file public/pdfs/the-fish-and-the-three-merry-men.pdf + SQL (1.3ms) SET NAMES 'utf8' + SQL (0.1ms) SET SQL_AUTO_IS_NULL=0 + + +Processing BooksController#show (for ::1 at 2009-06-15 00:49:48) [GET] + Parameters: {"url"=>"the-fish-and-the-three-merry-men"} + Book Columns (2.7ms) SHOW FIELDS FROM `books` + Book Load (0.4ms) SELECT * FROM `books` WHERE (`books`.`url` = 'the-fish-and-the-three-merry-men') LIMIT 1 +Rendering template within layouts/application +Rendering books/show +Completed in 19ms (View: 11, DB: 4) | 200 OK [http://localhost/the-fish-and-the-three-merry-men] + SQL (0.1ms) SET NAMES 'utf8' + SQL (0.1ms) SET SQL_AUTO_IS_NULL=0 + + +Processing BooksController#show (for ::1 at 2009-06-15 00:49:54) [GET] + Parameters: {"url"=>"the-fish-and-the-three-merry-men"} + Book Columns (2.4ms) SHOW FIELDS FROM `books` + Book Load (0.3ms) SELECT * FROM `books` WHERE (`books`.`url` = 'the-fish-and-the-three-merry-men') LIMIT 1 +Rendering template within layouts/application +Rendering books/show +Completed in 17ms (View: 9, DB: 3) | 200 OK [http://localhost/the-fish-and-the-three-merry-men] + SQL (0.1ms) SET NAMES 'utf8' + SQL (0.1ms) SET SQL_AUTO_IS_NULL=0 + + +Processing BooksController#show (for ::1 at 2009-06-15 00:50:04) [GET] + Parameters: {"url"=>"the-fish-and-the-three-merry-men"} + Book Columns (2.4ms) SHOW FIELDS FROM `books` + Book Load (0.3ms) SELECT * FROM `books` WHERE (`books`.`url` = 'the-fish-and-the-three-merry-men') LIMIT 1 +Rendering template within layouts/application +Rendering books/show +Completed in 19ms (View: 9, DB: 3) | 200 OK [http://localhost/the-fish-and-the-three-merry-men] + SQL (0.2ms) SET NAMES 'utf8' + SQL (0.1ms) SET SQL_AUTO_IS_NULL=0 + + +Processing BooksController#show (for ::1 at 2009-06-15 00:50:09) [GET] + Parameters: {"url"=>"the-fish-and-the-three-merry-men"} + Book Columns (2.5ms) SHOW FIELDS FROM `books` + Book Load (0.3ms) SELECT * FROM `books` WHERE (`books`.`url` = 'the-fish-and-the-three-merry-men') LIMIT 1 +Rendering template within layouts/application +Rendering books/show +Completed in 20ms (View: 12, DB: 3) | 200 OK [http://localhost/the-fish-and-the-three-merry-men] + SQL (0.1ms) SET NAMES 'utf8' + SQL (0.1ms) SET SQL_AUTO_IS_NULL=0 + + +Processing BooksController#show (for ::1 at 2009-06-15 00:50:33) [GET] + Parameters: {"url"=>"the-fish-and-the-three-merry-men"} + Book Columns (2.1ms) SHOW FIELDS FROM `books` + Book Load (0.3ms) SELECT * FROM `books` WHERE (`books`.`url` = 'the-fish-and-the-three-merry-men') LIMIT 1 +Rendering template within layouts/application +Rendering books/show +Completed in 13ms (View: 5, DB: 3) | 200 OK [http://localhost/the-fish-and-the-three-merry-men] + SQL (0.1ms) SET NAMES 'utf8' + SQL (0.1ms) SET SQL_AUTO_IS_NULL=0 + + +Processing BooksController#show (for ::1 at 2009-06-15 00:50:34) [GET] + Parameters: {"url"=>"the-fish-and-the-three-merry-men"} + Book Columns (3.6ms) SHOW FIELDS FROM `books` + Book Load (0.4ms) SELECT * FROM `books` WHERE (`books`.`url` = 'the-fish-and-the-three-merry-men') LIMIT 1 +Rendering template within layouts/application +Rendering books/show +Completed in 14ms (View: 4, DB: 4) | 200 OK [http://localhost/the-fish-and-the-three-merry-men] + SQL (0.1ms) SET NAMES 'utf8' + SQL (0.1ms) SET SQL_AUTO_IS_NULL=0 + + +Processing BooksController#show (for ::1 at 2009-06-15 00:50:51) [GET] + Parameters: {"url"=>"the-fish-and-the-three-merry-men"} + Book Columns (2.0ms) SHOW FIELDS FROM `books` + Book Load (0.5ms) SELECT * FROM `books` WHERE (`books`.`url` = 'the-fish-and-the-three-merry-men') LIMIT 1 +Rendering template within layouts/application +Rendering books/show +Completed in 14ms (View: 4, DB: 3) | 200 OK [http://localhost/the-fish-and-the-three-merry-men] + SQL (0.1ms) SET NAMES 'utf8' + SQL (0.1ms) SET SQL_AUTO_IS_NULL=0 + + +Processing BooksController#show (for ::1 at 2009-06-15 00:50:57) [GET] + Parameters: {"url"=>"the-fish-and-the-three-merry-men"} + Book Columns (3.0ms) SHOW FIELDS FROM `books` + Book Load (0.4ms) SELECT * FROM `books` WHERE (`books`.`url` = 'the-fish-and-the-three-merry-men') LIMIT 1 +Rendering template within layouts/application +Rendering books/show +Completed in 16ms (View: 5, DB: 4) | 200 OK [http://localhost/the-fish-and-the-three-merry-men] + SQL (0.2ms) SET NAMES 'utf8' + SQL (0.1ms) SET SQL_AUTO_IS_NULL=0 + + +Processing BooksController#show (for ::1 at 2009-06-15 00:50:58) [GET] + Parameters: {"url"=>"the-fish-and-the-three-merry-men"} + Book Columns (2.5ms) SHOW FIELDS FROM `books` + Book Load (0.4ms) SELECT * FROM `books` WHERE (`books`.`url` = 'the-fish-and-the-three-merry-men') LIMIT 1 +Rendering template within layouts/application +Rendering books/show +Completed in 13ms (View: 4, DB: 3) | 200 OK [http://localhost/the-fish-and-the-three-merry-men] + SQL (0.2ms) SET NAMES 'utf8' + SQL (0.1ms) SET SQL_AUTO_IS_NULL=0 + + +Processing PdfController#create (for ::1 at 2009-06-15 00:51:03) [GET] + Parameters: {"url"=>"the-fish-and-the-three-merry-men"} + Book Columns (2.0ms) SHOW FIELDS FROM `books` + Book Load (0.3ms) SELECT * FROM `books` WHERE (`books`.`url` = 'the-fish-and-the-three-merry-men') LIMIT 1 +Completed in 251ms (View: 1, DB: 3) | 200 OK [http://localhost/the-fish-and-the-three-merry-men/pdf] +Streaming file public/pdfs/the-fish-and-the-three-merry-men.pdf + SQL (0.1ms) SET NAMES 'utf8' + SQL (0.1ms) SET SQL_AUTO_IS_NULL=0 + + +Processing BooksController#show (for ::1 at 2009-06-15 00:52:41) [GET] + Parameters: {"url"=>"the-fish-and-the-three-merry-men"} + Book Columns (2.5ms) SHOW FIELDS FROM `books` + Book Load (0.4ms) SELECT * FROM `books` WHERE (`books`.`url` = 'the-fish-and-the-three-merry-men') LIMIT 1 +Rendering template within layouts/application +Rendering books/show +Completed in 15ms (View: 4, DB: 3) | 200 OK [http://localhost/the-fish-and-the-three-merry-men] + SQL (0.1ms) SET NAMES 'utf8' + SQL (0.1ms) SET SQL_AUTO_IS_NULL=0 + + +Processing BooksController#show (for ::1 at 2009-06-15 00:53:40) [GET] + Parameters: {"url"=>"the-fish-and-the-three-merry-men"} + Book Columns (2.0ms) SHOW FIELDS FROM `books` + Book Load (0.3ms) SELECT * FROM `books` WHERE (`books`.`url` = 'the-fish-and-the-three-merry-men') LIMIT 1 +Rendering template within layouts/application +Rendering books/show +Completed in 19ms (View: 11, DB: 3) | 200 OK [http://localhost/the-fish-and-the-three-merry-men] + SQL (0.1ms) SET NAMES 'utf8' + SQL (0.1ms) SET SQL_AUTO_IS_NULL=0 + + +Processing BooksController#show (for ::1 at 2009-06-15 00:54:43) [GET] + Parameters: {"url"=>"the-fish-and-the-three-merry-men"} + Book Columns (3.0ms) SHOW FIELDS FROM `books` + Book Load (1.7ms) SELECT * FROM `books` WHERE (`books`.`url` = 'the-fish-and-the-three-merry-men') LIMIT 1 +Rendering template within layouts/application +Rendering books/show +Completed in 17ms (View: 5, DB: 5) | 200 OK [http://localhost/the-fish-and-the-three-merry-men] + SQL (0.1ms) SET NAMES 'utf8' + SQL (0.1ms) SET SQL_AUTO_IS_NULL=0 + + +Processing BooksController#show (for ::1 at 2009-06-15 00:54:46) [GET] + Parameters: {"url"=>"images"} + Book Columns (2.7ms) SHOW FIELDS FROM `books` + Book Load (1.3ms) SELECT * FROM `books` WHERE (`books`.`url` = 'images') LIMIT 1 +Redirected to http://localhost:3000/title +Completed in 12ms (DB: 4) | 302 Found [http://localhost/images/] + SQL (0.1ms) SET NAMES 'utf8' + SQL (0.1ms) SET SQL_AUTO_IS_NULL=0 + + +Processing BooksController#title (for ::1 at 2009-06-15 00:54:46) [GET] + Book Columns (5.6ms) SHOW FIELDS FROM `books` +Rendering template within layouts/application +Rendering books/title +Completed in 18ms (View: 3, DB: 6) | 200 OK [http://localhost/title] + SQL (0.1ms) SET NAMES 'utf8' + SQL (0.2ms) SET SQL_AUTO_IS_NULL=0 + + +Processing ApplicationController#index (for ::1 at 2009-06-15 00:54:46) [GET] + +ActionController::RoutingError (No route matches "/images/sha" with {:method=>:get}): + /usr/local/ruby1.8.6/lib/ruby/1.8/webrick/httpserver.rb:104:in `service' + /usr/local/ruby1.8.6/lib/ruby/1.8/webrick/httpserver.rb:65:in `run' + /usr/local/ruby1.8.6/lib/ruby/1.8/webrick/server.rb:173:in `start_thread' + /usr/local/ruby1.8.6/lib/ruby/1.8/webrick/server.rb:162:in `start' + /usr/local/ruby1.8.6/lib/ruby/1.8/webrick/server.rb:162:in `start_thread' + /usr/local/ruby1.8.6/lib/ruby/1.8/webrick/server.rb:95:in `start' + /usr/local/ruby1.8.6/lib/ruby/1.8/webrick/server.rb:92:in `each' + /usr/local/ruby1.8.6/lib/ruby/1.8/webrick/server.rb:92:in `start' + /usr/local/ruby1.8.6/lib/ruby/1.8/webrick/server.rb:23:in `start' + /usr/local/ruby1.8.6/lib/ruby/1.8/webrick/server.rb:82:in `start' + +Rendering rescues/layout (not_found) + SQL (0.1ms) SET NAMES 'utf8' + SQL (0.2ms) SET SQL_AUTO_IS_NULL=0 + + +Processing ApplicationController#index (for ::1 at 2009-06-15 00:54:48) [GET] + +ActionController::RoutingError (No route matches "/images/shadow.ong" with {:method=>:get}): + /usr/local/ruby1.8.6/lib/ruby/1.8/webrick/httpserver.rb:104:in `service' + /usr/local/ruby1.8.6/lib/ruby/1.8/webrick/httpserver.rb:65:in `run' + /usr/local/ruby1.8.6/lib/ruby/1.8/webrick/server.rb:173:in `start_thread' + /usr/local/ruby1.8.6/lib/ruby/1.8/webrick/server.rb:162:in `start' + /usr/local/ruby1.8.6/lib/ruby/1.8/webrick/server.rb:162:in `start_thread' + /usr/local/ruby1.8.6/lib/ruby/1.8/webrick/server.rb:95:in `start' + /usr/local/ruby1.8.6/lib/ruby/1.8/webrick/server.rb:92:in `each' + /usr/local/ruby1.8.6/lib/ruby/1.8/webrick/server.rb:92:in `start' + /usr/local/ruby1.8.6/lib/ruby/1.8/webrick/server.rb:23:in `start' + /usr/local/ruby1.8.6/lib/ruby/1.8/webrick/server.rb:82:in `start' + +Rendering rescues/layout (not_found) + SQL (0.1ms) SET NAMES 'utf8' + SQL (0.1ms) SET SQL_AUTO_IS_NULL=0 + + +Processing ApplicationController#index (for ::1 at 2009-06-15 00:54:51) [GET] + +ActionController::RoutingError (No route matches "/images/shadow.png" with {:method=>:get}): + /usr/local/ruby1.8.6/lib/ruby/1.8/webrick/httpserver.rb:104:in `service' + /usr/local/ruby1.8.6/lib/ruby/1.8/webrick/httpserver.rb:65:in `run' + /usr/local/ruby1.8.6/lib/ruby/1.8/webrick/server.rb:173:in `start_thread' + /usr/local/ruby1.8.6/lib/ruby/1.8/webrick/server.rb:162:in `start' + /usr/local/ruby1.8.6/lib/ruby/1.8/webrick/server.rb:162:in `start_thread' + /usr/local/ruby1.8.6/lib/ruby/1.8/webrick/server.rb:95:in `start' + /usr/local/ruby1.8.6/lib/ruby/1.8/webrick/server.rb:92:in `each' + /usr/local/ruby1.8.6/lib/ruby/1.8/webrick/server.rb:92:in `start' + /usr/local/ruby1.8.6/lib/ruby/1.8/webrick/server.rb:23:in `start' + /usr/local/ruby1.8.6/lib/ruby/1.8/webrick/server.rb:82:in `start' + +Rendering rescues/layout (not_found) + SQL (0.3ms) SET NAMES 'utf8' + SQL (2.2ms) SET SQL_AUTO_IS_NULL=0 + + +Processing ApplicationController#index (for ::1 at 2009-06-15 00:54:56) [GET] + +ActionController::RoutingError (No route matches "/images/shadow.png" with {:method=>:get}): + /usr/local/ruby1.8.6/lib/ruby/1.8/webrick/httpserver.rb:104:in `service' + /usr/local/ruby1.8.6/lib/ruby/1.8/webrick/httpserver.rb:65:in `run' + /usr/local/ruby1.8.6/lib/ruby/1.8/webrick/server.rb:173:in `start_thread' + /usr/local/ruby1.8.6/lib/ruby/1.8/webrick/server.rb:162:in `start' + /usr/local/ruby1.8.6/lib/ruby/1.8/webrick/server.rb:162:in `start_thread' + /usr/local/ruby1.8.6/lib/ruby/1.8/webrick/server.rb:95:in `start' + /usr/local/ruby1.8.6/lib/ruby/1.8/webrick/server.rb:92:in `each' + /usr/local/ruby1.8.6/lib/ruby/1.8/webrick/server.rb:92:in `start' + /usr/local/ruby1.8.6/lib/ruby/1.8/webrick/server.rb:23:in `start' + /usr/local/ruby1.8.6/lib/ruby/1.8/webrick/server.rb:82:in `start' + +Rendering rescues/layout (not_found) + SQL (0.1ms) SET NAMES 'utf8' + SQL (0.1ms) SET SQL_AUTO_IS_NULL=0 + + +Processing BooksController#show (for ::1 at 2009-06-15 00:57:39) [GET] + Parameters: {"url"=>"the-fish-and-the-three-merry-men"} + Book Columns (2.7ms) SHOW FIELDS FROM `books` + Book Load (0.4ms) SELECT * FROM `books` WHERE (`books`.`url` = 'the-fish-and-the-three-merry-men') LIMIT 1 +Rendering template within layouts/application +Rendering books/show +Completed in 15ms (View: 5, DB: 3) | 200 OK [http://localhost/the-fish-and-the-three-merry-men] + SQL (0.1ms) SET NAMES 'utf8' + SQL (0.1ms) SET SQL_AUTO_IS_NULL=0 + + +Processing BooksController#show (for ::1 at 2009-06-15 00:58:19) [GET] + Parameters: {"url"=>"the-fish-and-the-three-merry-men"} + Book Columns (3.6ms) SHOW FIELDS FROM `books` + Book Load (0.5ms) SELECT * FROM `books` WHERE (`books`.`url` = 'the-fish-and-the-three-merry-men') LIMIT 1 +Rendering template within layouts/application +Rendering books/show +Completed in 16ms (View: 6, DB: 4) | 200 OK [http://localhost/the-fish-and-the-three-merry-men] + SQL (0.1ms) SET NAMES 'utf8' + SQL (0.1ms) SET SQL_AUTO_IS_NULL=0 + + +Processing BooksController#show (for ::1 at 2009-06-15 00:58:21) [GET] + Parameters: {"url"=>"image"} + Book Columns (1.8ms) SHOW FIELDS FROM `books` + Book Load (0.3ms) SELECT * FROM `books` WHERE (`books`.`url` = 'image') LIMIT 1 +Redirected to http://localhost:3000/title +Completed in 8ms (DB: 2) | 302 Found [http://localhost/image] + SQL (0.1ms) SET NAMES 'utf8' + SQL (0.1ms) SET SQL_AUTO_IS_NULL=0 + + +Processing BooksController#title (for ::1 at 2009-06-15 00:58:21) [GET] + Book Columns (2.0ms) SHOW FIELDS FROM `books` +Rendering template within layouts/application +Rendering books/title +Completed in 16ms (View: 7, DB: 2) | 200 OK [http://localhost/title] + SQL (0.1ms) SET NAMES 'utf8' + SQL (0.1ms) SET SQL_AUTO_IS_NULL=0 + + +Processing BooksController#show (for ::1 at 2009-06-15 00:58:21) [GET] + Parameters: {"url"=>"images"} + Book Columns (2.6ms) SHOW FIELDS FROM `books` + Book Load (0.7ms) SELECT * FROM `books` WHERE (`books`.`url` = 'images') LIMIT 1 +Redirected to http://localhost:3000/title +Completed in 9ms (DB: 3) | 302 Found [http://localhost/images/] + SQL (0.1ms) SET NAMES 'utf8' + SQL (0.1ms) SET SQL_AUTO_IS_NULL=0 + + +Processing BooksController#title (for ::1 at 2009-06-15 00:58:22) [GET] + Book Columns (2.2ms) SHOW FIELDS FROM `books` +Rendering template within layouts/application +Rendering books/title +Completed in 12ms (View: 4, DB: 2) | 200 OK [http://localhost/title] + SQL (0.1ms) SET NAMES 'utf8' + SQL (0.1ms) SET SQL_AUTO_IS_NULL=0 + + +Processing BooksController#show (for ::1 at 2009-06-15 01:00:12) [GET] + Parameters: {"url"=>"the-fish-and-the-three-merry-men"} + Book Columns (2.4ms) SHOW FIELDS FROM `books` + Book Load (0.4ms) SELECT * FROM `books` WHERE (`books`.`url` = 'the-fish-and-the-three-merry-men') LIMIT 1 +Rendering template within layouts/application +Rendering books/show +Completed in 14ms (View: 4, DB: 3) | 200 OK [http://localhost/the-fish-and-the-three-merry-men] + SQL (0.2ms) SET NAMES 'utf8' + SQL (0.1ms) SET SQL_AUTO_IS_NULL=0 + + +Processing BooksController#show (for ::1 at 2009-06-15 01:00:14) [GET] + Parameters: {"url"=>"the-fish-and-the-three-merry-men"} + Book Columns (2.7ms) SHOW FIELDS FROM `books` + Book Load (0.3ms) SELECT * FROM `books` WHERE (`books`.`url` = 'the-fish-and-the-three-merry-men') LIMIT 1 +Rendering template within layouts/application +Rendering books/show +Completed in 13ms (View: 4, DB: 3) | 200 OK [http://localhost/the-fish-and-the-three-merry-men] + SQL (0.1ms) SET NAMES 'utf8' + SQL (0.1ms) SET SQL_AUTO_IS_NULL=0 + + +Processing BooksController#show (for ::1 at 2009-06-15 01:00:29) [GET] + Parameters: {"url"=>"the-fish-and-the-three-merry-men"} + Book Columns (2.2ms) SHOW FIELDS FROM `books` + Book Load (1.2ms) SELECT * FROM `books` WHERE (`books`.`url` = 'the-fish-and-the-three-merry-men') LIMIT 1 +Rendering template within layouts/application +Rendering books/show +Completed in 14ms (View: 4, DB: 4) | 200 OK [http://localhost/the-fish-and-the-three-merry-men] + SQL (0.1ms) SET NAMES 'utf8' + SQL (0.1ms) SET SQL_AUTO_IS_NULL=0 + + +Processing BooksController#show (for ::1 at 2009-06-15 01:00:47) [GET] + Parameters: {"url"=>"the-fish-and-the-three-merry-men"} + Book Columns (2.7ms) SHOW FIELDS FROM `books` + Book Load (0.4ms) SELECT * FROM `books` WHERE (`books`.`url` = 'the-fish-and-the-three-merry-men') LIMIT 1 +Rendering template within layouts/application +Rendering books/show +Completed in 18ms (View: 10, DB: 3) | 200 OK [http://localhost/the-fish-and-the-three-merry-men] + SQL (0.1ms) SET NAMES 'utf8' + SQL (0.1ms) SET SQL_AUTO_IS_NULL=0 + + +Processing BooksController#show (for ::1 at 2009-06-15 01:00:59) [GET] + Parameters: {"url"=>"the-fish-and-the-three-merry-men"} + Book Columns (2.4ms) SHOW FIELDS FROM `books` + Book Load (0.4ms) SELECT * FROM `books` WHERE (`books`.`url` = 'the-fish-and-the-three-merry-men') LIMIT 1 +Rendering template within layouts/application +Rendering books/show +Completed in 19ms (View: 9, DB: 3) | 200 OK [http://localhost/the-fish-and-the-three-merry-men] + SQL (0.1ms) SET NAMES 'utf8' + SQL (0.1ms) SET SQL_AUTO_IS_NULL=0 + + +Processing BooksController#show (for ::1 at 2009-06-15 01:03:12) [GET] + Parameters: {"url"=>"the-fish-and-the-three-merry-men"} + Book Columns (3.1ms) SHOW FIELDS FROM `books` + Book Load (0.4ms) SELECT * FROM `books` WHERE (`books`.`url` = 'the-fish-and-the-three-merry-men') LIMIT 1 +Rendering template within layouts/application +Rendering books/show +Completed in 14ms (View: 4, DB: 4) | 200 OK [http://localhost/the-fish-and-the-three-merry-men] diff --git a/public/.DS_Store b/public/.DS_Store index 7c87f07..3bcbd57 100644 Binary files a/public/.DS_Store and b/public/.DS_Store differ diff --git a/public/images/.DS_Store b/public/images/.DS_Store new file mode 100644 index 0000000..5008ddf Binary files /dev/null and b/public/images/.DS_Store differ diff --git a/public/images/shadow.gif b/public/images/shadow.gif index 818964f..63562d2 100644 Binary files a/public/images/shadow.gif and b/public/images/shadow.gif differ diff --git a/public/images/shadow.png b/public/images/shadow.png new file mode 100644 index 0000000..7d5c2e7 Binary files /dev/null and b/public/images/shadow.png differ diff --git a/public/images/shadow2.png b/public/images/shadow2.png new file mode 100644 index 0000000..0fd9156 Binary files /dev/null and b/public/images/shadow2.png differ diff --git a/public/javascripts/application.js b/public/javascripts/application.js index c0fdeda..522bbd7 100644 --- a/public/javascripts/application.js +++ b/public/javascripts/application.js @@ -13,7 +13,7 @@ splitPages = function() { }).reverse(); var chapters = $.map(chapters, function(chapter, number) { number = number + 1; - return '
' + number + '
' + chapter + '
'; + return '
' + number + '
' + chapter + '
'; }).reverse(); $.each(chapters, function(number, page) { diff --git a/public/javascripts/jquery.smartarea.js b/public/javascripts/jquery.smartarea.js new file mode 100644 index 0000000..fb3a66f --- /dev/null +++ b/public/javascripts/jquery.smartarea.js @@ -0,0 +1,30 @@ +jQuery.fn.smartArea = function() { + + return this.each(function() { + if (!jQuery(this).is("textarea")) { + return false; + } + + jQuery(this).click( function() { + jQuery.SA.resizeArea( this ); + }).keyup(function(){ + jQuery.SA.resizeArea( this ); } ); + return this; + }); + +} + +jQuery.SA = { + resizeArea : function ( t ) { + + var lines = t.value.split('\n') || []; + var newRows = lines.length; + var oldRows = t.rows; + for (var i = 0; i < lines.length; i++) { + var line = lines[i]; + if (line.length >= t.cols) newRows += Math.floor(line.length / t.cols); + } + if (newRows > t.rows) t.rows = newRows; + if (newRows < t.rows) t.rows = Math.max(1, newRows); + } +} \ No newline at end of file diff --git a/public/javascripts/tools.tooltip-1.0.2.js b/public/javascripts/tools.tooltip-1.0.2.js new file mode 100644 index 0000000..03f31a8 --- /dev/null +++ b/public/javascripts/tools.tooltip-1.0.2.js @@ -0,0 +1,279 @@ +/** + * tools.tooltip 1.0.2 - Tooltips done right. + * + * Copyright (c) 2009 Tero Piirainen + * http://flowplayer.org/tools/tooltip.html + * + * Dual licensed under MIT and GPL 2+ licenses + * http://www.opensource.org/licenses + * + * Launch : November 2008 + * Date: 2009-06-12 11:02:45 +0000 (Fri, 12 Jun 2009) + * Revision: 1911 + */ +(function($) { + + // static constructs + $.tools = $.tools || {version: {}}; + + $.tools.version.tooltip = '1.0.2'; + + + var effects = { + toggle: [ + function() { this.getTip().show(); }, + function() { this.getTip().hide(); } + ], + + fade: [ + function() { this.getTip().fadeIn(this.getConf().fadeInSpeed); }, + function() { this.getTip().fadeOut(this.getConf().fadeOutSpeed); } + ] + }; + + + $.tools.addTipEffect = function(name, loadFn, hideFn) { + effects[name] = [loadFn, hideFn]; + }; + + + /* this is how you add custom effects */ + + /* + default effect: "slideup", custom configuration variables: + - slideOffset + - slideInSpeed + - slideOutSpeed + */ + $.tools.addTipEffect("slideup", + + function() { + var conf = this.getConf(); + var o = conf.slideOffset || 10; + this.getTip().css({opacity:0}).animate({ + top: '-=' + o, + opacity:conf.opacity + }, conf.slideInSpeed || 200).show(); + }, + + function() { + var conf = this.getConf(); + var o = conf.slideOffset || 10; + this.getTip().animate({top: '-=' + o, opacity:0}, conf.slideOutSpeed || 200, function() { + $(this).hide().animate({top: '+=' + (o * 2)}, 0); + }); + } + ); + + function Tooltip(trigger, conf) { + + var self = this; + + // find the tip + var tip = trigger.next(); + + if (conf.tip) { + + // single tip. ie: #tip + if (conf.tip.indexOf("#") != -1) { + tip = $(conf.tip); + + } else { + + // find sibling + tip = trigger.nextAll(conf.tip).eq(0); + + // find sibling from the parent element + if (!tip.length) { + tip = trigger.parent().nextAll(conf.tip).eq(0); + } + } + } + + // generic binding function + function bind(name, fn) { + $(self).bind(name, function(e, args) { + if (fn && fn.call(this) === false && args) { + args.proceed = false; + } + }); + + return self; + } + + // bind all callbacks from configuration + $.each(conf, function(name, fn) { + if ($.isFunction(fn)) { bind(name, fn); } + }); + + + // mouse interaction + var isInput = trigger.is("input, textarea"); + trigger.bind(isInput ? "focus" : "mouseover", function(e) { + e.target = this; + self.show(e); + tip.hover(function() { self.show(); }, function() { self.hide(); }); + }); + + trigger.bind(isInput ? "blur" : "mouseout", function() { + self.hide(); + }); + + tip.css("opacity", conf.opacity); + + var timer = 0; + + $.extend(self, { + + show: function(e) { + + if (e) { trigger = $(e.target); } + + clearTimeout(timer); + if (tip.is(":animated") || tip.is(":visible")) { return self; } + + // onBeforeShow + var p = {proceed: true}; + $(self).trigger("onBeforeShow", p); + if (!p.proceed) { return self; } + + + + /* calculate tip position */ + + // vertical axis + var top = trigger.position().top - tip.outerHeight(); + var height = tip.outerHeight() + trigger.outerHeight(); + var pos = conf.position[0]; + if (pos == 'center') { top += height / 2; } + if (pos == 'bottom') { top += height; } + + + // horizontal axis + var width = trigger.outerWidth() + tip.outerWidth(); + var left = trigger.position().left + trigger.outerWidth(); + pos = conf.position[1]; + + + if (pos == 'center') { left -= width / 2; } + if (pos == 'left') { left -= width; } + + // offset + top += conf.offset[0]; + left += conf.offset[1]; + + // set position + tip.css({position:'absolute', top: top, left: left}); + + + effects[conf.effect][0].call(self); + $(self).trigger("onShow"); + return self; + }, + + hide: function() { + clearTimeout(timer); + + timer = setTimeout(function() { + if (!tip.is(":visible")) { return self; } + + // onBeforeHide + var p = {proceed: true}; + $(self).trigger("onBeforeHide", p); + if (!p.proceed) { return self; } + + + effects[conf.effect][1].call(self); + $(self).trigger("onHide"); + + }, conf.delay || 1); + + return self; + }, + + isShown: function() { + return tip.is(":visible, :animated"); + }, + + getConf: function() { + return conf; + }, + + getTip: function() { + return tip; + }, + + getTrigger: function() { + return trigger; + }, + + // callback functions + onBeforeShow: function(fn) { + return bind("onBeforeShow", fn); + }, + + onShow: function(fn) { + return bind("onShow", fn); + }, + + onBeforeHide: function(fn) { + return bind("onBeforeHide", fn); + }, + + onHide: function(fn) { + return bind("onHide", fn); + } + + }); + + } + + + // jQuery plugin implementation + $.prototype.tooltip = function(conf) { + + // return existing instance + var el = this.eq(typeof conf == 'number' ? conf : 0).data("tooltip"); + if (el) { return el; } + + // setup options + var opts = { + + /* + - slideOffset + - slideInSpeed + - slideOutSpeed + */ + + tip: null, + effect: 'slideup', + delay: 30, + opacity: 1, + + // 'top', 'bottom', 'right', 'left', 'center' + position: ['top', 'center'], + offset: [0, 0], + api: false + }; + + if ($.isFunction(conf)) { + conf = {onBeforeShow: conf}; + } + + $.extend(opts, conf); + + // install tabs for each items in jQuery + this.each(function() { + el = new Tooltip($(this), opts); + $(this).data("tooltip", el); + }); + + + return opts.api ? el: this; + + }; + +}) (jQuery); + + + diff --git a/public/pdfs/the-fish-and-the-three-merry-men.pdf b/public/pdfs/the-fish-and-the-three-merry-men.pdf new file mode 100644 index 0000000..4b8f133 Binary files /dev/null and b/public/pdfs/the-fish-and-the-three-merry-men.pdf differ diff --git a/public/stylesheets/basic.css b/public/stylesheets/basic.css index 11d9497..a005f99 100644 --- a/public/stylesheets/basic.css +++ b/public/stylesheets/basic.css @@ -57,14 +57,19 @@ input:hover, input:focus { font-size: 1.3em; } #book_text { - height: 166px; background-color: #efecdc; padding: 2em; border: 2px solid #bcb9ad; } +.shadow { + width: 490px; + height: 18px; + margin: 0 auto; + background-image: url('/images/shadow.png'); } + .page { position: relative; - margin: 10px auto; + margin: 10px auto 0px; padding: 20px; padding-bottom: 18px; width: 450px; @@ -105,14 +110,13 @@ input:hover, input:focus { -webkit-border-bottom-right-radius: 10px; } .hardcopy .pdf { - position: absolute; - top: 0px; - right: 0px; + position: fixed; + top: 5px; + right: 5px; + padding: 10px; background-color: #efecdc; - -moz-border-radius-topleft: 10px; - -moz-border-radius-bottomleft: 10px; - -webkit-border-top-left-radius: 10px; - -webkit-border-bottom-left-radius: 10px; } + -moz-border-radius: 10px; + -webkit-border-radius: 10px; } ol.chapternav { position: fixed; diff --git a/public/stylesheets/sass/basic.sass b/public/stylesheets/sass/basic.sass index 68a73b6..f98c775 100644 --- a/public/stylesheets/sass/basic.sass +++ b/public/stylesheets/sass/basic.sass @@ -57,14 +57,20 @@ input:hover, input:focus :font-size 1.3em #book_text - :height 166px + // :height 166px :background-color #efecdc :padding 2em :border 2px solid #bcb9ad - + +.shadow + :width 490px + :height 18px + :margin 0 auto + :background-image url('/images/shadow2.png') + .page :position relative - :margin 10px auto + :margin 10px auto 0px :padding 20px :padding-bottom 18px :width 450px @@ -116,14 +122,13 @@ input:hover, input:focus .hardcopy .pdf - :position absolute - :top 0px - :right 0px + :position fixed + :top 5px + :right 5px + :padding 10px :background-color #efecdc - :-moz-border-radius-topleft 10px - :-moz-border-radius-bottomleft 10px - :-webkit-border-top-left-radius 10px - :-webkit-border-bottom-left-radius 10px + :-moz-border-radius 10px + :-webkit-border-radius 10px ol.chapternav :position fixed