mirror of
https://github.com/Growstuff/growstuff.git
synced 2026-05-19 06:15:44 -04:00
rubocop lint
This commit is contained in:
@@ -41,9 +41,9 @@ class ConversationsController < ApplicationController
|
||||
|
||||
def set_box
|
||||
@boxes = {
|
||||
'inbox' => { 'total' => mailbox.inbox.size, 'unread' => 0},
|
||||
'sent' => { 'total' => mailbox.sentbox.size, 'unread' => 0},
|
||||
'trash' => { 'total' => mailbox.trash.size, 'unread' => 0}
|
||||
'inbox' => { 'total' => mailbox.inbox.size, 'unread' => 0 },
|
||||
'sent' => { 'total' => mailbox.sentbox.size, 'unread' => 0 },
|
||||
'trash' => { 'total' => mailbox.trash.size, 'unread' => 0 }
|
||||
}
|
||||
@box = if params[:box].blank? || !@boxes.keys.include?(params[:box])
|
||||
'inbox'
|
||||
@@ -55,7 +55,8 @@ class ConversationsController < ApplicationController
|
||||
def check_current_subject_in_conversation
|
||||
@conversation = Mailboxer::Conversation.find_by(id: params[:id])
|
||||
return unless @conversation.nil? || !@conversation.is_participant?(current_member)
|
||||
|
||||
redirect_to conversations_path(box: box)
|
||||
return
|
||||
nil
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user