Great tutorial, thank you for writing. Though I ran into two issues.
- I get an error when sending messages:
wrong number of arguments (1 for 0)
It points to this line in the messages_controller:
conversation = current_user.send_message(recipients, params[:message][:body], params[:message][:subject]).conversation
Here is a stack trace:
Started POST "/messages" for 10.0.2.2 at 2015-10-10 16:23:39 +0000
Processing by MessagesController#create as HTML
Parameters: {"utf8"=>"â", "authenticity_token"=>"YiqT94X0gvp2W9aT1PNTx6iRM3E40ozMlkgZsU6LGpfoBxTygHFdBSkeyUYHHwGwWX+x8QpjJTEj4HYyrqhxng==", "message"=>{"subject"=>"work", "body"=>"pleas work this time!"}, "recipients"=>["2"], "commit"=>"Send"}
User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 ORDER BY "users"."id" ASC LIMIT 1 [["id", 1]]
User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = 2
(0.2ms) BEGIN
SQL (0.7ms) INSERT INTO "mailboxer_conversations" ("subject", "created_at", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["subject", "work"], ["created_at", "2015-10-10 16:23:39.424583"], ["updated_at", "2015-10-10 16:23:39.424583"]]
SQL (0.3ms) INSERT INTO "mailboxer_notifications" ("type", "sender_id", "sender_type", "body", "subject", "created_at", "updated_at", "conversation_id") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id" [["type", "Mailboxer::Message"], ["sender_id", 1], ["sender_type", "User"], ["body", "pleas work this time!"], ["subject", "work"], ["created_at", "2015-10-10 16:23:39.424583"], ["updated_at", "2015-10-10 16:23:39.424583"], ["conversation_id", 10]]
SQL (0.2ms) INSERT INTO "mailboxer_receipts" ("mailbox_type", "receiver_id", "receiver_type", "notification_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["mailbox_type", "inbox"], ["receiver_id", 2], ["receiver_type", "User"], ["notification_id", 12], ["created_at", "2015-10-10 16:23:39.436761"], ["updated_at", "2015-10-10 16:23:39.436761"]]
(0.8ms) COMMIT
(0.3ms) BEGIN
SQL (0.2ms) INSERT INTO "mailboxer_receipts" ("mailbox_type", "receiver_id", "receiver_type", "is_read", "notification_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["mailbox_type", "sentbox"], ["receiver_id", 1], ["receiver_type", "User"], ["is_read", "t"], ["notification_id", 12], ["created_at", "2015-10-10 16:23:39.441001"], ["updated_at", "2015-10-10 16:23:39.441001"]]
(0.5ms) COMMIT
(0.2ms) SELECT COUNT(*) FROM "mailboxer_conversation_opt_outs" WHERE "mailboxer_conversation_opt_outs"."conversation_id" = $1 AND "mailboxer_conversation_opt_outs"."unsubscriber_type" = $2 AND "mailboxer_conversation_opt_outs"."unsubscriber_id" = $3 [["conversation_id", 10], ["unsubscriber_type", "User"], ["unsubscriber_id", 2]]
Completed 500 Internal Server Error in 23ms (ActiveRecord: 3.8ms)
ArgumentError (wrong number of arguments (1 for 0)):
app/controllers/messages_controller.rb:9:in `create'
Rendered /usr/local/rvm/gems/ruby-2.2.3/gems/actionpack-4.2.4/lib/action_dispatch/middleware/templates/rescues/_source.erb (4.5ms)
Rendered /usr/local/rvm/gems/ruby-2.2.3/gems/actionpack-4.2.4/lib/action_dispatch/middleware/templates/rescues/_trace.html.erb (3.0ms)
Rendered /usr/local/rvm/gems/ruby-2.2.3/gems/actionpack-4.2.4/lib/action_dispatch/middleware/templates/rescues/_request_and_response.html.erb (1.2ms)
Rendered /usr/local/rvm/gems/ruby-2.2.3/gems/actionpack-4.2.4/lib/action_dispatch/middleware/templates/rescues/diagnostics.html.erb within rescues/layout (23.1ms)
Rendered /usr/local/rvm/gems/ruby-2.2.3/gems/web-console-2.2.1/lib/web_console/templates/_markup.html.erb (0.3ms)
Rendered /usr/local/rvm/gems/ruby-2.2.3/gems/web-console-2.2.1/lib/web_console/templates/_inner_console_markup.html.erb within layouts/inlined_string (0.2ms)
Rendered /usr/local/rvm/gems/ruby-2.2.3/gems/web-console-2.2.1/lib/web_console/templates/_prompt_box_markup.html.erb within layouts/inlined_string (0.2ms)
Rendered /usr/local/rvm/gems/ruby-2.2.3/gems/web-console-2.2.1/lib/web_console/templates/style.css.erb within layouts/inlined_string (0.2ms)
Rendered /usr/local/rvm/gems/ruby-2.2.3/gems/web-console-2.2.1/lib/web_console/templates/console.js.erb within layouts/javascript (12.8ms)
Rendered /usr/local/rvm/gems/ruby-2.2.3/gems/web-console-2.2.1/lib/web_console/templates/main.js.erb within layouts/javascript (0.4ms)
Rendered /usr/local/rvm/gems/ruby-2.2.3/gems/web-console-2.2.1/lib/web_console/templates/error_page.js.erb within layouts/javascript (0.4ms)
Rendered /usr/local/rvm/gems/ruby-2.2.3/gems/web-console-2.2.1/lib/web_console/templates/index.html.erb (27.3ms)
-
I am getting the âResource Not Foundâ message when I try to empty the trash.
Started DELETE â/conversations/empty_trashâ for 10.0.2.2 at 2015-10-10 16:21:49 +0000
Processing by ConversationsController#empty_trash as HTML
Parameters: {âauthenticity_tokenâ=>âmhCTp4FfbBlr573VGWT8PKM16Lu5pAKo93nHVfNMF075wWvnIUMkpO+ipat7rsP3dLNWf7WyYmXxphcQK6C+0w==â}
User Load (0.3ms) SELECT âusersâ.* FROM âusersâ WHERE âusersâ.âidâ = $1 ORDER BY âusersâ.âidâ ASC LIMIT 1 [[âidâ, 2]]
Redirected to http://localhost:3000/conversations?box=trash
Completed 302 Found in 4ms (ActiveRecord: 0.3ms)
Started GET â/conversations?box=trashâ for 10.0.2.2 at 2015-10-10 16:21:49 +0000
Processing by ConversationsController#index as HTML
Parameters: {âboxâ=>âtrashâ}
User Load (0.3ms) SELECT âusersâ.* FROM âusersâ WHERE âusersâ.âidâ = $1 ORDER BY âusersâ.âidâ ASC LIMIT 1 [[âidâ, 2]]
(0.4ms) SELECT DISTINCT COUNT(DISTINCT âmailboxer_conversationsâ.âidâ) FROM âmailboxer_conversationsâ INNER JOIN âmailboxer_notificationsâ ON âmailboxer_notificationsâ.âconversation_idâ = âmailboxer_conversationsâ.âidâ AND âmailboxer_notificationsâ.âtypeâ IN (âMailboxer::Messageâ) INNER JOIN âmailboxer_receiptsâ ON âmailboxer_receiptsâ.ânotification_idâ = âmailboxer_notificationsâ.âidâ WHERE âmailboxer_notificationsâ.âtypeâ = âMailboxer::Messageâ AND âmailboxer_receiptsâ.âmailbox_typeâ = $1 AND âmailboxer_receiptsâ.âtrashedâ = $2 AND âmailboxer_receiptsâ.âdeletedâ = $3 AND âmailboxer_notificationsâ.âtypeâ = âMailboxer::Messageâ AND âmailboxer_receiptsâ.âreceiver_idâ = $4 AND âmailboxer_receiptsâ.âreceiver_typeâ = $5 AND âmailboxer_receiptsâ.âis_readâ = $6 [[âmailbox_typeâ, âinboxâ], [âtrashedâ, âfâ], [âdeletedâ, âfâ], [âreceiver_idâ, 2], [âreceiver_typeâ, âUserâ], [âis_readâ, âfâ]]
(0.8ms) SELECT DISTINCT COUNT(DISTINCT âmailboxer_conversationsâ.âidâ) FROM âmailboxer_conversationsâ INNER JOIN âmailboxer_notificationsâ ON âmailboxer_notificationsâ.âconversation_idâ = âmailboxer_conversationsâ.âidâ AND âmailboxer_notificationsâ.âtypeâ IN (âMailboxer::Messageâ) INNER JOIN âmailboxer_receiptsâ ON âmailboxer_receiptsâ.ânotification_idâ = âmailboxer_notificationsâ.âidâ WHERE âmailboxer_notificationsâ.âtypeâ = âMailboxer::Messageâ AND âmailboxer_receiptsâ.âreceiver_idâ = $1 AND âmailboxer_receiptsâ.âreceiver_typeâ = $2 AND âmailboxer_receiptsâ.âtrashedâ = $3 AND âmailboxer_receiptsâ.âdeletedâ = $4 [[âreceiver_idâ, 2], [âreceiver_typeâ, âUserâ], [âtrashedâ, âtâ], [âdeletedâ, âfâ]]
Mailboxer::Conversation Load (0.7ms) SELECT DISTINCT âmailboxer_conversationsâ.* FROM âmailboxer_conversationsâ INNER JOIN âmailboxer_notificationsâ ON âmailboxer_notificationsâ.âconversation_idâ = âmailboxer_conversationsâ.âidâ AND âmailboxer_notificationsâ.âtypeâ IN (âMailboxer::Messageâ) INNER JOIN âmailboxer_receiptsâ ON âmailboxer_receiptsâ.ânotification_idâ = âmailboxer_notificationsâ.âidâ WHERE âmailboxer_notificationsâ.âtypeâ = âMailboxer::Messageâ AND âmailboxer_receiptsâ.âreceiver_idâ = $1 AND âmailboxer_receiptsâ.âreceiver_typeâ = $2 AND âmailboxer_receiptsâ.âtrashedâ = $3 AND âmailboxer_receiptsâ.âdeletedâ = $4 ORDER BY mailboxer_conversations.updated_at DESC LIMIT 10 OFFSET 0 [[âreceiver_idâ, 2], [âreceiver_typeâ, âUserâ], [âtrashedâ, âtâ], [âdeletedâ, âfâ]]
(0.7ms) SELECT COUNT() FROM âmailboxer_receiptsâ INNER JOIN âmailboxer_notificationsâ ON âmailboxer_notificationsâ.âidâ = âmailboxer_receiptsâ.ânotification_idâ AND âmailboxer_notificationsâ.âtypeâ IN (âMailboxer::Messageâ) WHERE âmailboxer_notificationsâ.âconversation_idâ = 9 AND âmailboxer_receiptsâ.âreceiver_idâ = $1 AND âmailboxer_receiptsâ.âreceiver_typeâ = $2 AND âmailboxer_receiptsâ.âtrashedâ = $3 AND âmailboxer_receiptsâ.âdeletedâ = $4 [[âreceiver_idâ, 2], [âreceiver_typeâ, âUserâ], [âtrashedâ, âtâ], [âdeletedâ, âfâ]]
Mailboxer::Message Load (0.4ms) SELECT âmailboxer_notificationsâ. FROM âmailboxer_notificationsâ WHERE âmailboxer_notificationsâ.âtypeâ IN (âMailboxer::Messageâ) AND âmailboxer_notificationsâ.âconversation_idâ = $1 ORDER BY created_at LIMIT 1 [[âconversation_idâ, 9]]
Mailboxer::Receipt Load (0.2ms) SELECT âmailboxer_receiptsâ.* FROM âmailboxer_receiptsâ WHERE âmailboxer_receiptsâ.ânotification_idâ = $1 [[ânotification_idâ, 11]]
User Load (0.2ms) SELECT âusersâ.* FROM âusersâ WHERE âusersâ.âidâ = $1 LIMIT 1 [[âidâ, 2]]
User Load (0.2ms) SELECT âusersâ.* FROM âusersâ WHERE âusersâ.âidâ = $1 LIMIT 1 [[âidâ, 1]]
Rendered conversations/_participants.html.erb (6.2ms)
Mailboxer::Message Load (0.2ms) SELECT âmailboxer_notificationsâ.* FROM âmailboxer_notificationsâ WHERE âmailboxer_notificationsâ.âtypeâ IN (âMailboxer::Messageâ) AND âmailboxer_notificationsâ.âconversation_idâ = $1 ORDER BY created_at DESC LIMIT 1 [[âconversation_idâ, 9]]
(0.5ms) SELECT COUNT() FROM âmailboxer_receiptsâ INNER JOIN âmailboxer_notificationsâ ON âmailboxer_notificationsâ.âidâ = âmailboxer_receiptsâ.ânotification_idâ AND âmailboxer_notificationsâ.âtypeâ IN (âMailboxer::Messageâ) WHERE âmailboxer_notificationsâ.âconversation_idâ = 8 AND âmailboxer_receiptsâ.âreceiver_idâ = $1 AND âmailboxer_receiptsâ.âreceiver_typeâ = $2 AND âmailboxer_receiptsâ.âtrashedâ = $3 AND âmailboxer_receiptsâ.âdeletedâ = $4 [[âreceiver_idâ, 2], [âreceiver_typeâ, âUserâ], [âtrashedâ, âtâ], [âdeletedâ, âfâ]]
Mailboxer::Message Load (0.3ms) SELECT âmailboxer_notificationsâ. FROM âmailboxer_notificationsâ WHERE âmailboxer_notificationsâ.âtypeâ IN (âMailboxer::Messageâ) AND âmailboxer_notificationsâ.âconversation_idâ = $1 ORDER BY created_at LIMIT 1 [[âconversation_idâ, 8]]
Mailboxer::Receipt Load (0.1ms) SELECT âmailboxer_receiptsâ.* FROM âmailboxer_receiptsâ WHERE âmailboxer_receiptsâ.ânotification_idâ = $1 [[ânotification_idâ, 10]]
CACHE (0.0ms) SELECT âusersâ.* FROM âusersâ WHERE âusersâ.âidâ = $1 LIMIT 1 [[âidâ, 2]]
CACHE (0.0ms) SELECT âusersâ.* FROM âusersâ WHERE âusersâ.âidâ = $1 LIMIT 1 [[âidâ, 1]]
Rendered conversations/_participants.html.erb (5.6ms)
Mailboxer::Message Load (0.3ms) SELECT âmailboxer_notificationsâ.* FROM âmailboxer_notificationsâ WHERE âmailboxer_notificationsâ.âtypeâ IN (âMailboxer::Messageâ) AND âmailboxer_notificationsâ.âconversation_idâ = $1 ORDER BY created_at DESC LIMIT 1 [[âconversation_idâ, 8]]
(0.3ms) SELECT COUNT() FROM âmailboxer_receiptsâ INNER JOIN âmailboxer_notificationsâ ON âmailboxer_notificationsâ.âidâ = âmailboxer_receiptsâ.ânotification_idâ AND âmailboxer_notificationsâ.âtypeâ IN (âMailboxer::Messageâ) WHERE âmailboxer_notificationsâ.âconversation_idâ = 7 AND âmailboxer_receiptsâ.âreceiver_idâ = $1 AND âmailboxer_receiptsâ.âreceiver_typeâ = $2 AND âmailboxer_receiptsâ.âtrashedâ = $3 AND âmailboxer_receiptsâ.âdeletedâ = $4 [[âreceiver_idâ, 2], [âreceiver_typeâ, âUserâ], [âtrashedâ, âtâ], [âdeletedâ, âfâ]]
Mailboxer::Message Load (0.2ms) SELECT âmailboxer_notificationsâ. FROM âmailboxer_notificationsâ WHERE âmailboxer_notificationsâ.âtypeâ IN (âMailboxer::Messageâ) AND âmailboxer_notificationsâ.âconversation_idâ = $1 ORDER BY created_at LIMIT 1 [[âconversation_idâ, 7]]
Mailboxer::Receipt Load (0.1ms) SELECT âmailboxer_receiptsâ.* FROM âmailboxer_receiptsâ WHERE âmailboxer_receiptsâ.ânotification_idâ = $1 [[ânotification_idâ, 9]]
CACHE (0.0ms) SELECT âusersâ.* FROM âusersâ WHERE âusersâ.âidâ = $1 LIMIT 1 [[âidâ, 2]]
CACHE (0.0ms) SELECT âusersâ.* FROM âusersâ WHERE âusersâ.âidâ = $1 LIMIT 1 [[âidâ, 1]]
Rendered conversations/_participants.html.erb (5.2ms)
Mailboxer::Message Load (0.4ms) SELECT âmailboxer_notificationsâ.* FROM âmailboxer_notificationsâ WHERE âmailboxer_notificationsâ.âtypeâ IN (âMailboxer::Messageâ) AND âmailboxer_notificationsâ.âconversation_idâ = $1 ORDER BY created_at DESC LIMIT 1 [[âconversation_idâ, 7]]
(0.5ms) SELECT COUNT() FROM âmailboxer_receiptsâ INNER JOIN âmailboxer_notificationsâ ON âmailboxer_notificationsâ.âidâ = âmailboxer_receiptsâ.ânotification_idâ AND âmailboxer_notificationsâ.âtypeâ IN (âMailboxer::Messageâ) WHERE âmailboxer_notificationsâ.âconversation_idâ = 6 AND âmailboxer_receiptsâ.âreceiver_idâ = $1 AND âmailboxer_receiptsâ.âreceiver_typeâ = $2 AND âmailboxer_receiptsâ.âtrashedâ = $3 AND âmailboxer_receiptsâ.âdeletedâ = $4 [[âreceiver_idâ, 2], [âreceiver_typeâ, âUserâ], [âtrashedâ, âtâ], [âdeletedâ, âfâ]]
Mailboxer::Message Load (0.3ms) SELECT âmailboxer_notificationsâ. FROM âmailboxer_notificationsâ WHERE âmailboxer_notificationsâ.âtypeâ IN (âMailboxer::Messageâ) AND âmailboxer_notificationsâ.âconversation_idâ = $1 ORDER BY created_at LIMIT 1 [[âconversation_idâ, 6]]
Mailboxer::Receipt Load (0.2ms) SELECT âmailboxer_receiptsâ.* FROM âmailboxer_receiptsâ WHERE âmailboxer_receiptsâ.ânotification_idâ = $1 [[ânotification_idâ, 8]]
CACHE (0.0ms) SELECT âusersâ.* FROM âusersâ WHERE âusersâ.âidâ = $1 LIMIT 1 [[âidâ, 2]]
CACHE (0.0ms) SELECT âusersâ.* FROM âusersâ WHERE âusersâ.âidâ = $1 LIMIT 1 [[âidâ, 1]]
Rendered conversations/_participants.html.erb (6.1ms)
Mailboxer::Message Load (0.5ms) SELECT âmailboxer_notificationsâ.* FROM âmailboxer_notificationsâ WHERE âmailboxer_notificationsâ.âtypeâ IN (âMailboxer::Messageâ) AND âmailboxer_notificationsâ.âconversation_idâ = $1 ORDER BY created_at DESC LIMIT 1 [[âconversation_idâ, 6]]
(0.4ms) SELECT COUNT() FROM âmailboxer_receiptsâ INNER JOIN âmailboxer_notificationsâ ON âmailboxer_notificationsâ.âidâ = âmailboxer_receiptsâ.ânotification_idâ AND âmailboxer_notificationsâ.âtypeâ IN (âMailboxer::Messageâ) WHERE âmailboxer_notificationsâ.âconversation_idâ = 4 AND âmailboxer_receiptsâ.âreceiver_idâ = $1 AND âmailboxer_receiptsâ.âreceiver_typeâ = $2 AND âmailboxer_receiptsâ.âtrashedâ = $3 AND âmailboxer_receiptsâ.âdeletedâ = $4 [[âreceiver_idâ, 2], [âreceiver_typeâ, âUserâ], [âtrashedâ, âtâ], [âdeletedâ, âfâ]]
Mailboxer::Message Load (0.3ms) SELECT âmailboxer_notificationsâ. FROM âmailboxer_notificationsâ WHERE âmailboxer_notificationsâ.âtypeâ IN (âMailboxer::Messageâ) AND âmailboxer_notificationsâ.âconversation_idâ = $1 ORDER BY created_at LIMIT 1 [[âconversation_idâ, 4]]
Mailboxer::Receipt Load (0.2ms) SELECT âmailboxer_receiptsâ.* FROM âmailboxer_receiptsâ WHERE âmailboxer_receiptsâ.ânotification_idâ = $1 [[ânotification_idâ, 4]]
CACHE (0.0ms) SELECT âusersâ.* FROM âusersâ WHERE âusersâ.âidâ = $1 LIMIT 1 [[âidâ, 1]]
CACHE (0.0ms) SELECT âusersâ.* FROM âusersâ WHERE âusersâ.âidâ = $1 LIMIT 1 [[âidâ, 2]]
Rendered conversations/_participants.html.erb (5.2ms)
Mailboxer::Message Load (0.2ms) SELECT âmailboxer_notificationsâ.* FROM âmailboxer_notificationsâ WHERE âmailboxer_notificationsâ.âtypeâ IN (âMailboxer::Messageâ) AND âmailboxer_notificationsâ.âconversation_idâ = $1 ORDER BY created_at DESC LIMIT 1 [[âconversation_idâ, 4]]
(0.5ms) SELECT COUNT() FROM âmailboxer_receiptsâ INNER JOIN âmailboxer_notificationsâ ON âmailboxer_notificationsâ.âidâ = âmailboxer_receiptsâ.ânotification_idâ AND âmailboxer_notificationsâ.âtypeâ IN (âMailboxer::Messageâ) WHERE âmailboxer_notificationsâ.âconversation_idâ = 2 AND âmailboxer_receiptsâ.âreceiver_idâ = $1 AND âmailboxer_receiptsâ.âreceiver_typeâ = $2 AND âmailboxer_receiptsâ.âtrashedâ = $3 AND âmailboxer_receiptsâ.âdeletedâ = $4 [[âreceiver_idâ, 2], [âreceiver_typeâ, âUserâ], [âtrashedâ, âtâ], [âdeletedâ, âfâ]]
Mailboxer::Message Load (0.3ms) SELECT âmailboxer_notificationsâ. FROM âmailboxer_notificationsâ WHERE âmailboxer_notificationsâ.âtypeâ IN (âMailboxer::Messageâ) AND âmailboxer_notificationsâ.âconversation_idâ = $1 ORDER BY created_at LIMIT 1 [[âconversation_idâ, 2]]
Mailboxer::Receipt Load (0.2ms) SELECT âmailboxer_receiptsâ.* FROM âmailboxer_receiptsâ WHERE âmailboxer_receiptsâ.ânotification_idâ = $1 [[ânotification_idâ, 2]]
CACHE (0.0ms) SELECT âusersâ.* FROM âusersâ WHERE âusersâ.âidâ = $1 LIMIT 1 [[âidâ, 2]]
CACHE (0.0ms) SELECT âusersâ.* FROM âusersâ WHERE âusersâ.âidâ = $1 LIMIT 1 [[âidâ, 1]]
Rendered conversations/_participants.html.erb (6.2ms)
Mailboxer::Message Load (0.6ms) SELECT âmailboxer_notificationsâ.* FROM âmailboxer_notificationsâ WHERE âmailboxer_notificationsâ.âtypeâ IN (âMailboxer::Messageâ) AND âmailboxer_notificationsâ.âconversation_idâ = $1 ORDER BY created_at DESC LIMIT 1 [[âconversation_idâ, 2]]
(0.7ms) SELECT COUNT() FROM âmailboxer_receiptsâ INNER JOIN âmailboxer_notificationsâ ON âmailboxer_notificationsâ.âidâ = âmailboxer_receiptsâ.ânotification_idâ AND âmailboxer_notificationsâ.âtypeâ IN (âMailboxer::Messageâ) WHERE âmailboxer_notificationsâ.âconversation_idâ = 1 AND âmailboxer_receiptsâ.âreceiver_idâ = $1 AND âmailboxer_receiptsâ.âreceiver_typeâ = $2 AND âmailboxer_receiptsâ.âtrashedâ = $3 AND âmailboxer_receiptsâ.âdeletedâ = $4 [[âreceiver_idâ, 2], [âreceiver_typeâ, âUserâ], [âtrashedâ, âtâ], [âdeletedâ, âfâ]]
Mailboxer::Message Load (0.3ms) SELECT âmailboxer_notificationsâ. FROM âmailboxer_notificationsâ WHERE âmailboxer_notificationsâ.âtypeâ IN (âMailboxer::Messageâ) AND âmailboxer_notificationsâ.âconversation_idâ = $1 ORDER BY created_at LIMIT 1 [[âconversation_idâ, 1]]
Mailboxer::Receipt Load (0.2ms) SELECT âmailboxer_receiptsâ.* FROM âmailboxer_receiptsâ WHERE âmailboxer_receiptsâ.ânotification_idâ = $1 [[ânotification_idâ, 1]]
CACHE (0.0ms) SELECT âusersâ.* FROM âusersâ WHERE âusersâ.âidâ = $1 LIMIT 1 [[âidâ, 2]]
CACHE (0.0ms) SELECT âusersâ.* FROM âusersâ WHERE âusersâ.âidâ = $1 LIMIT 1 [[âidâ, 1]]
Rendered conversations/_participants.html.erb (5.7ms)
Mailboxer::Message Load (0.3ms) SELECT âmailboxer_notificationsâ.* FROM âmailboxer_notificationsâ WHERE âmailboxer_notificationsâ.âtypeâ IN (âMailboxer::Messageâ) AND âmailboxer_notificationsâ.âconversation_idâ = $1 ORDER BY created_at DESC LIMIT 1 [[âconversation_idâ, 1]]
Rendered conversations/_conversation.html.erb (163.7ms)
Rendered conversations/index.html.erb within layouts/application (186.6ms)
Rendered layouts/_nav.html.erb (3.0ms)
Rendered layouts/_alert.html.erb (0.7ms)
Completed 200 OK in 637ms (Views: 621.1ms | ActiveRecord: 12.2ms)
If you need any more information, please let me know. I have been staring at this code for days now trying to figure out whatâs wrong.
Thanks