mirror of
https://github.com/maybe-finance/maybe.git
synced 2025-07-21 06:09:38 +02:00
13 lines
275 B
Ruby
13 lines
275 B
Ruby
|
module ChatsHelper
|
||
|
def chat_frame
|
||
|
:sidebar_chat
|
||
|
end
|
||
|
|
||
|
def chat_view_path(chat)
|
||
|
return new_chat_path if params[:chat_view] == "new"
|
||
|
return chats_path if chat.nil? || params[:chat_view] == "all"
|
||
|
|
||
|
chat.persisted? ? chat_path(chat) : new_chat_path
|
||
|
end
|
||
|
end
|