Skip to content

Instantly share code, notes, and snippets.

@markbao
Created July 1, 2009 01:38
Show Gist options
  • Save markbao/138544 to your computer and use it in GitHub Desktop.
Save markbao/138544 to your computer and use it in GitHub Desktop.
Processing CommentsController#create (for 127.0.0.1 at 2009-06-30 21:35:42) [POST]
Parameters: {"commit"=>"Add Note", "action"=>"create", "controller"=>"comments", "comment"=>{"commentable_type"=>"Lead", "commentable_id"=>"50", "user_id"=>"1", "comment"=>"asdfasdf"}, "_"=>""}
SQL (0.3ms) SELECT VERSION()
User Columns (3.1ms) SHOW FIELDS FROM `users`
User Load (0.8ms) SELECT * FROM `users` WHERE (`users`.`id` = 1) AND (users.deleted_at IS NULL OR users.deleted_at > '2009-07-01 01:35:42') LIMIT 1
SQL (0.1ms) BEGIN
User Update (1.7ms) UPDATE `users` SET `updated_at` = '2009-07-01 01:35:42', `last_request_at` = '2009-07-01 01:35:42' WHERE `id` = 1
SQL (59.5ms) COMMIT
Comment Columns (23.5ms) SHOW FIELDS FROM `comments`
Lead Columns (3.3ms) SHOW FIELDS FROM `leads`
Lead Load (0.5ms) SELECT * FROM `leads` WHERE (`leads`.`id` = 50) AND (leads.deleted_at IS NULL OR leads.deleted_at > '2009-07-01 01:35:42')
Lead Load Including Associations (0.5ms) SELECT `leads`.`id` AS t0_r0, `leads`.`uuid` AS t0_r1, `leads`.`user_id` AS t0_r2, `leads`.`campaign_id` AS t0_r3, `leads`.`assigned_to` AS t0_r4, `leads`.`first_name` AS t0_r5, `leads`.`last_name` AS t0_r6, `leads`.`access` AS t0_r7, `leads`.`title` AS t0_r8, `leads`.`company` AS t0_r9, `leads`.`source` AS t0_r10, `leads`.`status` AS t0_r11, `leads`.`referred_by` AS t0_r12, `leads`.`email` AS t0_r13, `leads`.`alt_email` AS t0_r14, `leads`.`phone` AS t0_r15, `leads`.`mobile` AS t0_r16, `leads`.`blog` AS t0_r17, `leads`.`linkedin` AS t0_r18, `leads`.`facebook` AS t0_r19, `leads`.`twitter` AS t0_r20, `leads`.`address` AS t0_r21, `leads`.`rating` AS t0_r22, `leads`.`do_not_call` AS t0_r23, `leads`.`deleted_at` AS t0_r24, `leads`.`created_at` AS t0_r25, `leads`.`updated_at` AS t0_r26, `permissions`.`id` AS t1_r0, `permissions`.`user_id` AS t1_r1, `permissions`.`asset_id` AS t1_r2, `permissions`.`asset_type` AS t1_r3, `permissions`.`created_at` AS t1_r4, `permissions`.`updated_at` AS t1_r5 FROM `leads` LEFT OUTER JOIN `permissions` ON `permissions`.asset_id = `leads`.id AND `permissions`.asset_type = 'Lead'WHERE (`leads`.`id` = 50) AND ((leads.user_id=1 OR leads.assigned_to=1 OR permissions.user_id=NULL OR access='Public') AND (leads.deleted_at IS NULL OR leads.deleted_at > '2009-07-01 01:35:42')) ORDER BY leads.id DESC
SQL (0.1ms) BEGIN
Comment Create (0.4ms) INSERT INTO `comments` (`commentable_type`, `updated_at`, `title`, `private`, `commentable_id`, `user_id`, `comment`, `created_at`) VALUES('Lead', '2009-07-01 01:35:42', '', NULL, 50, 1, 'asdfasdf', '2009-07-01 01:35:42')
User Load (0.3ms) SELECT * FROM `users` WHERE (`users`.`id` = 1) AND (users.deleted_at IS NULL OR users.deleted_at > '2009-07-01 01:35:42') LIMIT 1
User Update (0.3ms) UPDATE `users` SET `updated_at` = '2009-07-01 01:35:42', `last_request_at` = '2009-07-01 01:35:42' WHERE `id` = 1
Activity Columns (1.7ms) SHOW FIELDS FROM `activities`
Activity Create (0.5ms) INSERT INTO `activities` (`updated_at`, `info`, `private`, `action`, `subject_type`, `subject_id`, `user_id`, `created_at`) VALUES('2009-07-01 01:35:42', 'Kobe Beier', 0, 'commented', 'Lead', 50, 1, '2009-07-01 01:35:42')
Activity Load (1.2ms) SELECT * FROM `activities` WHERE (user_id=1 AND subject_id=50 AND subject_type='Lead' AND action='viewed') LIMIT 1
Activity Update (0.3ms) UPDATE `activities` SET `updated_at` = '2009-07-01 01:35:42' WHERE `id` = 2365
SQL (0.5ms) COMMIT
Rendering comments/create
DEPRECATION WARNING: @comment will no longer be implicitly assigned to comment. (called from parse_object_ref at /crm/fat_free_crm/vendor/gems/haml-2.1.0/lib/haml/buffer.rb:218)
DEPRECATION WARNING: @comment will no longer be implicitly assigned to comment. (called from parse_object_ref at /crm/fat_free_crm/vendor/gems/haml-2.1.0/lib/haml/buffer.rb:219)
DEPRECATION WARNING: @comment will no longer be implicitly assigned to comment. (called from parse_object_ref at /crm/fat_free_crm/vendor/gems/haml-2.1.0/lib/haml/buffer.rb:220)
DEPRECATION WARNING: @comment will no longer be implicitly assigned to comment. (called from _run_haml_app47views47common47_comment46html46haml_locals_comment_object at /crm/fat_free_crm/app/views/common/_comment.html.haml:2)
User Load (0.6ms) SELECT * FROM `users` WHERE (`users`.`id` = 1) AND (users.deleted_at IS NULL OR users.deleted_at > '2009-07-01 01:35:42')
DEPRECATION WARNING: @comment will no longer be implicitly assigned to comment. (called from _run_haml_app47views47common47_comment46html46haml_locals_comment_object at /crm/fat_free_crm/app/views/common/_comment.html.haml:5)
DEPRECATION WARNING: @comment will no longer be implicitly assigned to comment. (called from _run_haml_app47views47common47_comment46html46haml_locals_comment_object at /crm/fat_free_crm/app/views/common/_comment.html.haml:5)
ActionView::TemplateError (user_url failed to generate from {:action=>"show", :controller=>"users", :id=>"[email protected]"}, expected: {:controller=>"users", :action=>"show"}, diff: {:id=>"[email protected]"}) on line #5 of app/views/common/_comment.html.haml:
2: = gravatar_for(comment.user, :size => "25x25", :default => "#{request.protocol + request.host_with_port}/images/avatar.jpg")
3: /= image_tag "avatar.jpg", :size => "25x25"
4: .body
5: = link_to comment.user.full_name, user_path(comment.user.email)
6: %tt= time_ago(comment.created_at)
7: %dt= comment.comment
(eval):16:in `user_path'
app/views/common/_comment.html.haml:5:in `_run_haml_app47views47common47_comment46html46haml_locals_comment_object'
haml (2.1.0) [v] lib/haml/helpers/action_view_mods.rb:14:in `render'
app/views/comments/create.js.rjs:2:in `__instance_exec0'
app/views/comments/create.js.rjs:1:in `_run_rjs_app47views47comments47create46js46rjs'
haml (2.1.0) [v] lib/haml/helpers/action_view_mods.rb:14:in `render'
app/controllers/comments_controller.rb:68:in `create'
haml (2.1.0) [v] rails/./lib/sass/plugin/rails.rb:19:in `process'
Rendered rescues/_trace (113.1ms)
Rendered rescues/_request_and_response (0.4ms)
Rendering rescues/layout (internal_server_error)
@kewinwang
Copy link

i meet the same problem today how to fix

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment