message_train 0.6.7 → 0.6.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 4d757134cad1d008553e317a501152cff6883c0c
4
- data.tar.gz: c16084eff35f58f678b14b3499fe13ccc2a04da6
3
+ metadata.gz: 0dbc07d9cd29fdc66246023ddf25af18350bc82a
4
+ data.tar.gz: 4289514a7a1336956773e868e26ac96772a0d055
5
5
  SHA512:
6
- metadata.gz: f4c7d4c51747f5ac698b3d202a06f9579cfad32d3ab34e855fb9dc5f97ae82189c04664585d76abf7dccb4963e78dac9d67993700553f92984488ff8d06c8921
7
- data.tar.gz: 2086118ead92034bbb176954109ad36b48c6e39e83a50856442a1888f1ab13081ab4eea7cf979e7c4f2d238372e46f27ce6c0a0d93e1083c6d54139e32ba6e11
6
+ metadata.gz: 030e104e9a76af6d4f458ca89216c8536204c5912459fc22266a6f435a1beeb1d7e948cfae05a520ee95ddbe1e6d35f81a80a9761246494e58b8c2810a664af0
7
+ data.tar.gz: 683bb0788585eff1229621b33cabfb1775cea6939536191636505764e0f6795a49ee4d8eabb993f9311b5b640588952541a129d6157385360f858f04015956b9
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.6.7
1
+ 0.6.8
@@ -35,6 +35,13 @@ module MessageTrain
35
35
  )
36
36
  end
37
37
 
38
+ def box_title_with_badge(box_user)
39
+ render(
40
+ partial: 'message_train/boxes/dropdown_list',
41
+ locals: { boxes: box_user.all_boxes }
42
+ )
43
+ end
44
+
38
45
  def box_participant_name(participant)
39
46
  participant.send(
40
47
  MessageTrain.configuration.name_columns[
@@ -65,16 +72,11 @@ module MessageTrain
65
72
  @box_user
66
73
  ]
67
74
  updated_at = boxes.collect do |x|
68
- x.conversations && [
69
- x.conversations.maximum(:updated_at),
70
- x.conversations.maximum(:created_at)
71
- ].max
72
- end.compact
73
- logger.debug("updated_at #{updated_at.inspect}")
74
- updated_at.any? && parts << [
75
- updated_at.max
75
+ x.conversations && x.conversations.maximum(:updated_at)
76
+ end.compact.max
77
+ updated_at && parts << [
78
+ updated_at
76
79
  ]
77
- logger.debug("parts #{parts.inspect}")
78
80
  parts
79
81
  end
80
82
 
@@ -1,5 +1,5 @@
1
1
  - unless boxes.empty?
2
- - cache boxes_dropdown_cache_key(boxes), 'message-train' do
2
+ - cache ['message-train', boxes_dropdown_cache_key(boxes)] do
3
3
  = dropdown_nav_item "#{:box_title_in.l} #{badge(boxes.first.unread_count.to_s) unless boxes.first.unread_count == 0}".html_safe, '#' do
4
4
  - boxes.each do |box|
5
5
  = box_nav_item box
@@ -1,5 +1,5 @@
1
1
  - unless boxes.empty?
2
- - cache boxes_widget_cache_key(boxes), 'message-train' do
2
+ - cache ['message-train', boxes_widget_cache_key(boxes)] do
3
3
  .hidden-print
4
4
  %h3= :messages.l
5
5
  .text-center= link_to :compose.l, message_train.new_box_message_path(:in), class: 'btn btn-lg btn-primary btn-compose'
@@ -1,4 +1,4 @@
1
- - cache collectives_cache_key(collective_boxes, box_user), 'message-train' do
1
+ - cache ['message-train', collectives_cache_key(collective_boxes, box_user)] do
2
2
  - unless collective_boxes.empty?
3
3
  - collective_boxes.each do |key, boxes|
4
4
  - if show[key]
@@ -2,11 +2,11 @@
2
2
  # DO NOT EDIT THIS FILE DIRECTLY
3
3
  # Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
4
4
  # -*- encoding: utf-8 -*-
5
- # stub: message_train 0.6.7 ruby lib
5
+ # stub: message_train 0.6.8 ruby lib
6
6
 
7
7
  Gem::Specification.new do |s|
8
8
  s.name = "message_train"
9
- s.version = "0.6.7"
9
+ s.version = "0.6.8"
10
10
 
11
11
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
12
12
  s.require_paths = ["lib"]
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: message_train
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.7
4
+ version: 0.6.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Karen Lundgren