effective_messaging 0.7.5 → 0.8.0
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6d5586319e69df10977387b8dde4f21c28b6c091ba2d013c0aa92356c5d64612
|
4
|
+
data.tar.gz: 30780a50e3482bf8f66492f9b965f3dba832c2ccfd237753517214536484bc6c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 984b176a01cb8fb1e6935975f20fba184e0c4af16783faef38c6372dc76b85a9735b0b8d87723564026a22add1426c1a78b2c0d14c25f906d4b76470119a612e
|
7
|
+
data.tar.gz: 159df93437962685676e463ad350f91326de8d87efd440027b1da1e8f1b6061552a8d1bf307cdc8ba9fedc9faaf87574754421a2d3794a63410f7caf5518a27d
|
@@ -35,7 +35,13 @@ module Effective
|
|
35
35
|
validates :body, presence: true
|
36
36
|
|
37
37
|
def to_s
|
38
|
-
body.presence || 'New Chat Message'
|
38
|
+
truncate(body.presence || 'New Chat Message')
|
39
|
+
end
|
40
|
+
|
41
|
+
private
|
42
|
+
|
43
|
+
def truncate(value)
|
44
|
+
value.length > 100 ? (value.first(100) + '...') : value
|
39
45
|
end
|
40
46
|
|
41
47
|
end
|
@@ -3,6 +3,9 @@
|
|
3
3
|
= render 'admin/chats/form_chat', chat: chat
|
4
4
|
|
5
5
|
- if chat.persisted?
|
6
|
+
= tab(chat.chat_messages) do
|
7
|
+
= render_inline_datatable(Admin::EffectiveChatMessagesDatatable.new(chat: chat))
|
8
|
+
|
6
9
|
- if chat.respond_to?(:logs_datatable)
|
7
10
|
= tab "Logs" do
|
8
11
|
= render_inline_datatable(chat.logs_datatable)
|
data/config/routes.rb
CHANGED
@@ -12,7 +12,7 @@ EffectiveMessaging::Engine.routes.draw do
|
|
12
12
|
|
13
13
|
namespace :admin do
|
14
14
|
resources :chats
|
15
|
-
resources :chat_messages,
|
15
|
+
resources :chat_messages, except: [:new, :create]
|
16
16
|
|
17
17
|
resources :notifications do
|
18
18
|
post :enable, on: :member
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: effective_messaging
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.8.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Code and Effect
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-05-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -229,6 +229,7 @@ files:
|
|
229
229
|
- app/models/effective/notification.rb
|
230
230
|
- app/models/effective/notification_log.rb
|
231
231
|
- app/views/admin/chat_messages/_chat_message.html.haml
|
232
|
+
- app/views/admin/chat_messages/_form.html.haml
|
232
233
|
- app/views/admin/chats/_chat.html.haml
|
233
234
|
- app/views/admin/chats/_form.html.haml
|
234
235
|
- app/views/admin/chats/_form_chat.html.haml
|