message_train 0.6.17 → 0.7.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop.yml +16 -13
- data/.rubocop_todo.yml +12 -0
- data/.ruby-version +1 -1
- data/.travis.yml +1 -1
- data/Gemfile +28 -30
- data/README.md +284 -0
- data/Rakefile +6 -7
- data/VERSION +1 -1
- data/app/assets/javascripts/ckeditor/{config.js.coffee → config.js} +7 -6
- data/app/assets/stylesheets/message_train.scss +0 -8
- data/app/controllers/concerns/message_train_authorization.rb +37 -0
- data/app/controllers/concerns/message_train_support.rb +41 -69
- data/app/controllers/message_train/application_controller.rb +1 -0
- data/app/controllers/message_train/boxes_controller.rb +5 -4
- data/app/controllers/message_train/conversations_controller.rb +7 -5
- data/app/controllers/message_train/messages_controller.rb +43 -27
- data/app/controllers/message_train/participants_controller.rb +14 -25
- data/app/controllers/message_train/unsubscribes_controller.rb +96 -61
- data/app/helpers/message_train/application_helper.rb +13 -7
- data/app/helpers/message_train/attachments_helper.rb +4 -12
- data/app/helpers/message_train/boxes_helper.rb +4 -14
- data/app/helpers/message_train/collectives_helper.rb +23 -29
- data/app/helpers/message_train/conversations_helper.rb +52 -30
- data/app/helpers/message_train/messages_helper.rb +33 -20
- data/app/mailers/message_train/receipt_mailer.rb +22 -12
- data/app/models/message_train/attachment.rb +2 -2
- data/app/models/message_train/box.rb +182 -228
- data/app/models/message_train/conversation.rb +100 -103
- data/app/models/message_train/ignore.rb +83 -4
- data/app/models/message_train/message.rb +66 -117
- data/app/models/message_train/receipt.rb +73 -49
- data/app/views/message_train/boxes/show.html.haml +11 -7
- data/config/locales/en.yml +1 -0
- data/config/routes.rb +6 -12
- data/lib/message_train.rb +3 -1
- data/lib/message_train/class_methods.rb +51 -0
- data/lib/message_train/configuration.rb +28 -3
- data/lib/message_train/instance_methods.rb +209 -0
- data/lib/message_train/mixin.rb +25 -320
- data/message_train.gemspec +83 -83
- data/spec/controllers/message_train/boxes_controller_spec.rb +37 -19
- data/spec/controllers/message_train/concerns_spec.rb +21 -3
- data/spec/controllers/message_train/conversations_controller_spec.rb +41 -18
- data/spec/controllers/message_train/messages_controller_spec.rb +112 -31
- data/spec/controllers/message_train/participants_controller_spec.rb +33 -7
- data/spec/controllers/message_train/unsubscribes_controller_spec.rb +10 -8
- data/spec/dummy/app/assets/stylesheets/{application.css.scss → application.scss} +2 -1
- data/spec/dummy/app/assets/stylesheets/bootstrap-everything.scss +54 -0
- data/spec/dummy/app/models/group.rb +1 -1
- data/spec/dummy/app/views/layouts/application.html.haml +9 -8
- data/spec/dummy/bin/setup +8 -8
- data/spec/dummy/config/application.rb +0 -3
- data/spec/dummy/config/environments/test.rb +4 -2
- data/spec/dummy/db/schema.rb +94 -103
- data/spec/dummy/db/test.sqlite3 +0 -0
- data/spec/factories/attachment.rb +3 -1
- data/spec/factories/message.rb +2 -3
- data/spec/features/boxes_spec.rb +0 -3
- data/spec/helpers/message_train/application_helper_spec.rb +3 -2
- data/spec/helpers/message_train/attachment_helper_spec.rb +4 -0
- data/spec/helpers/message_train/boxes_helper_spec.rb +1 -0
- data/spec/helpers/message_train/collectives_helper_spec.rb +1 -0
- data/spec/helpers/message_train/conversations_helper_spec.rb +3 -2
- data/spec/helpers/message_train/messages_helper_spec.rb +2 -1
- data/spec/models/group_spec.rb +6 -4
- data/spec/models/message_train/box_spec.rb +0 -88
- data/spec/models/message_train/ignore_spec.rb +65 -0
- data/spec/models/message_train/message_spec.rb +6 -5
- data/spec/models/message_train/receipt_spec.rb +6 -8
- data/spec/models/role_spec.rb +2 -2
- data/spec/models/user_spec.rb +29 -101
- data/spec/rails_helper.rb +16 -30
- data/spec/support/feature_behaviors.rb +2 -1
- data/spec/support/shared_connection.rb +5 -0
- data/spec/support/utilities.rb +7 -8
- metadata +145 -120
- data/README.rdoc +0 -175
- data/spec/dummy/app/models/.keep +0 -0
- data/spec/dummy/log/.keep +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2c59cd4ee75e183221da8c3b2dd801177d7b3c60
|
4
|
+
data.tar.gz: c3cf3df9408cfb22be672d147c6fc92770056a4b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a5b8949dbc963fdda36d71c41eae7b8f3f6dde94c87da7876497d4406cf2ce0d7c503b02819e26e844b26efa0fa7a8e0a484c105127cc0bf3a761e170f894d27
|
7
|
+
data.tar.gz: c2689982f54869d3d999255d2fa9c44763bdd8b640a89e630e9b2d49e930aaffab60b658865bd0ecb4f4f7cb812ba3b133dbb7be2e1ff9147a936841673567a2
|
data/.rubocop.yml
CHANGED
@@ -1,20 +1,23 @@
|
|
1
|
+
inherit_from: .rubocop_todo.yml
|
2
|
+
|
1
3
|
AllCops:
|
4
|
+
DisplayCopNames: true
|
2
5
|
Exclude:
|
3
6
|
- message_train.gemspec
|
4
7
|
- db/migrate/*
|
5
8
|
- spec/dummy/db/schema.rb
|
6
9
|
- spec/dummy/db/migrate/*
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
Enabled: false
|
10
|
+
|
11
|
+
Metrics/BlockLength:
|
12
|
+
Exclude:
|
13
|
+
- config/routes.rb
|
14
|
+
- spec/*
|
15
|
+
- spec/*/*
|
16
|
+
- spec/*/*/*
|
17
|
+
- spec/dummy/db/seeds/*
|
18
|
+
|
17
19
|
Metrics/ModuleLength:
|
18
|
-
|
19
|
-
|
20
|
-
|
20
|
+
Exclude:
|
21
|
+
- spec/*
|
22
|
+
- spec/*/*
|
23
|
+
- spec/*/*/*
|
data/.rubocop_todo.yml
ADDED
@@ -0,0 +1,12 @@
|
|
1
|
+
# This configuration was generated by
|
2
|
+
# `rubocop --auto-gen-config`
|
3
|
+
# on 2017-03-23 13:39:31 -0600 using RuboCop version 0.47.1.
|
4
|
+
# The point is for the user to remove these configuration records
|
5
|
+
# one by one as the offenses are removed from the code base.
|
6
|
+
# Note that changes in the inspected code, or installation of new
|
7
|
+
# versions of RuboCop, may require this file to be generated again.
|
8
|
+
|
9
|
+
# Offense count: 3
|
10
|
+
# Configuration parameters: CountComments.
|
11
|
+
Metrics/ClassLength:
|
12
|
+
Max: 166
|
data/.ruby-version
CHANGED
@@ -1 +1 @@
|
|
1
|
-
2.2.
|
1
|
+
2.2.3
|
data/.travis.yml
CHANGED
data/Gemfile
CHANGED
@@ -1,62 +1,60 @@
|
|
1
1
|
source 'https://rubygems.org'
|
2
2
|
# Add dependencies required to use your gem here.
|
3
3
|
# Example:
|
4
|
-
# gem 'activesupport', '>= 2.3.5'
|
5
|
-
gem 'rails', '>= 4.2'
|
6
|
-
gem 'paperclip', '>= 4.2'
|
7
|
-
gem 'rails-i18n', '~> 4'
|
8
4
|
gem 'haml-rails', '~> 0.9'
|
9
5
|
gem 'jquery-rails', '~> 4'
|
10
|
-
gem '
|
6
|
+
gem 'paperclip', '>= 4.2', '< 6'
|
7
|
+
gem 'rails', '>= 4', '< 6'
|
8
|
+
gem 'rails-i18n', '>= 4', '< 6'
|
9
|
+
gem 'uglifier', '>= 2.7', '< 3.2'
|
11
10
|
|
12
11
|
# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
|
13
12
|
gem 'jbuilder', '~> 2.0'
|
14
13
|
|
15
|
-
gem 'sass-rails', '~> 5'
|
16
14
|
gem 'bootstrap-sass', '~> 3.3'
|
17
|
-
gem 'bootstrap_leather', '~> 0.8'
|
18
|
-
gem 'bootstrap_pager', '~> 0.10'
|
19
15
|
gem 'bootstrap_form', '~> 2.3'
|
20
|
-
gem '
|
16
|
+
gem 'bootstrap_leather', '~> 0.9'
|
17
|
+
gem 'bootstrap_pager', '~> 0.10'
|
21
18
|
gem 'bootstrap_tokenfield_rails', '~> 0.12'
|
19
|
+
gem 'ckeditor'
|
22
20
|
gem 'cocoon', '~> 1.2'
|
23
|
-
gem 'jquery-ui-bootstrap-rails
|
21
|
+
gem 'jquery-ui-bootstrap-rails'
|
22
|
+
gem 'sass-rails', '~> 5'
|
24
23
|
gem 'twitter-typeahead-rails'
|
25
24
|
|
26
25
|
# Add dependencies to develop your gem here.
|
27
26
|
# Include everything needed to run rake, tests, features, etc.
|
28
27
|
group :development do
|
29
|
-
gem 'sdoc', '~> 0.4.1'
|
30
28
|
gem 'bundler', '~> 1.0'
|
31
|
-
gem '
|
29
|
+
gem 'juwelier', '~> 2'
|
32
30
|
gem 'pre-commit', '~> 0.27'
|
33
|
-
gem 'rubocop', '~> 0.
|
34
|
-
gem '
|
35
|
-
gem '
|
31
|
+
gem 'rubocop', '~> 0.47.1', require: false
|
32
|
+
gem 'scss_lint', '~> 0.52', require: false
|
33
|
+
gem 'sdoc', '~> 0.4.1'
|
36
34
|
end
|
37
35
|
|
38
36
|
group :development, :test do
|
39
|
-
gem '
|
40
|
-
gem 'devise', '~>
|
41
|
-
gem 'rolify', '~> 4'
|
42
|
-
gem 'faker', '~> 1.4'
|
43
|
-
gem 'rspec-rails', '~> 3.2'
|
44
|
-
gem 'rspec-its', '~> 1.2'
|
37
|
+
gem 'byebug', '~> 9'
|
38
|
+
gem 'devise', '~> 4'
|
45
39
|
gem 'factory_girl_rails', '~> 4.5'
|
46
|
-
gem '
|
40
|
+
gem 'faker', '~> 1.4'
|
47
41
|
gem 'friendly_id', '~> 5'
|
48
|
-
gem '
|
49
|
-
gem '
|
42
|
+
gem 'high_voltage', '~> 3'
|
43
|
+
gem 'rolify', '>= 4', '< 5.2'
|
44
|
+
gem 'rspec-its', '>= 1'
|
45
|
+
gem 'rspec-rails', '>= 3', '< 4'
|
46
|
+
gem 'seedbank', '~> 0.3'
|
47
|
+
gem 'sqlite3', '~> 1.3'
|
50
48
|
end
|
51
49
|
|
52
50
|
group :test do
|
53
51
|
gem 'capybara', '~> 2.4'
|
54
|
-
gem 'capybara-webkit', '~> 1.12'
|
55
|
-
gem 'database_cleaner', '~> 1.4'
|
56
|
-
gem 'rspec-collection_matchers', '~> 1.1'
|
57
|
-
gem 'shoulda-matchers', '~> 2.8'
|
58
|
-
gem 'launchy', '~> 2.1.2', require: false
|
59
52
|
gem 'coveralls', '~> 0.8', require: false
|
53
|
+
gem 'database_cleaner', '~> 1.4'
|
54
|
+
gem 'launchy', '~> 2', require: false
|
55
|
+
gem 'poltergeist', '~> 1.14'
|
56
|
+
gem 'rails-controller-testing', '~> 1.0'
|
57
|
+
gem 'rspec-collection_matchers', '>= 1'
|
60
58
|
gem 'rspec-html-matchers', '~> 0.7'
|
61
|
-
gem '
|
59
|
+
gem 'shoulda-matchers', '>= 2.8', '< 3.2'
|
62
60
|
end
|
data/README.md
ADDED
@@ -0,0 +1,284 @@
|
|
1
|
+
# MessageTrain
|
2
|
+
[![Build Status](https://travis-ci.org/gemvein/message_train.svg)](https://travis-ci.org/gemvein/message_train)
|
3
|
+
[![Coverage Status](https://coveralls.io/repos/gemvein/message_train/badge.svg?branch=master&service=github)](https://coveralls.io/github/gemvein/message_train?branch=master)
|
4
|
+
[![Gem Version](https://badge.fury.io/rb/message_train.svg)](http://badge.fury.io/rb/message_train)
|
5
|
+
|
6
|
+
MessageTrain is a Rails 4 and 5 Private Messaging Gem that uses bootstrap to send
|
7
|
+
and display private messages from one user to another. It can also be
|
8
|
+
configured to send messages to a user collective (such as a certain Role or
|
9
|
+
Group of users).
|
10
|
+
|
11
|
+
Messages can be saved as drafts instead of sending. Message composition
|
12
|
+
features type-ahead completion for recipients, wysiwyg html bodies, and an
|
13
|
+
arbitrary number of attachments. Messages are grouped together into
|
14
|
+
conversations, and allow valid senders to reply to a given message. Any given
|
15
|
+
conversation can be ignored if it is no longer of interest to the user, at
|
16
|
+
which point no further messages will be received in that conversation. The
|
17
|
+
'read' or 'unread' status of messages is tracked automatically, and can also
|
18
|
+
be changed manually by the user.
|
19
|
+
|
20
|
+
Conversations are grouped into various boxes, depending on their status for
|
21
|
+
that user: in, sent, all, drafts, trash, ignored. Any message can be trashed
|
22
|
+
by the user, at which point the user has the option to permanently delete it.
|
23
|
+
|
24
|
+
Email messages are sent when a user receives a message, either directly or
|
25
|
+
through a collective (unless they have unsubscribed from those notifications
|
26
|
+
or all notifications).
|
27
|
+
|
28
|
+
### Inbox Page
|
29
|
+
![Inbox Screenshot](http://gemvein.com/assets/screenshots/message_train-box-in.png)
|
30
|
+
|
31
|
+
## Installation
|
32
|
+
|
33
|
+
First, install the gem:
|
34
|
+
|
35
|
+
```bash
|
36
|
+
gem 'ckeditor'
|
37
|
+
gem 'message_train'
|
38
|
+
```
|
39
|
+
|
40
|
+
Then, run the install generator:
|
41
|
+
|
42
|
+
```bash
|
43
|
+
rails g message_train:install
|
44
|
+
```
|
45
|
+
|
46
|
+
And then run `rake db:migrate`.
|
47
|
+
|
48
|
+
Next, add to your models, each of which will need some kind of display
|
49
|
+
name column and some kind of slug (could be the same). See below for the
|
50
|
+
options for this mixin:
|
51
|
+
|
52
|
+
```ruby
|
53
|
+
# in /app/models/user.rb
|
54
|
+
message_train
|
55
|
+
|
56
|
+
# OR to set the name and slug columns:
|
57
|
+
|
58
|
+
message_train slug_column: :short_name, name_column: :display_name
|
59
|
+
```
|
60
|
+
|
61
|
+
To include Message Train variables and helpers in your controllers, add
|
62
|
+
this concern to your controller or application controller:
|
63
|
+
|
64
|
+
```ruby
|
65
|
+
include MessageTrain::MessageTrainSupport
|
66
|
+
```
|
67
|
+
|
68
|
+
Add to your application.css.scss:
|
69
|
+
|
70
|
+
```scss
|
71
|
+
@import 'message_train';
|
72
|
+
```
|
73
|
+
|
74
|
+
And in your application.js:
|
75
|
+
|
76
|
+
```js
|
77
|
+
//= require message_train
|
78
|
+
```
|
79
|
+
|
80
|
+
In your layout, supposing you use haml:
|
81
|
+
|
82
|
+
```haml
|
83
|
+
#alert_area
|
84
|
+
= alert_flash_messages
|
85
|
+
```
|
86
|
+
|
87
|
+
If you use bootstrap, you can use the built-in bootstrap sidebar menu
|
88
|
+
(makes use of bootstrap_leather, which is a dependency of this gem)
|
89
|
+
|
90
|
+
```haml
|
91
|
+
- if user_signed_in?
|
92
|
+
= message_train_widget
|
93
|
+
= render_widgets 'md', 3
|
94
|
+
```
|
95
|
+
|
96
|
+
### Required helper methods
|
97
|
+
|
98
|
+
If you don't use devise with its `current_user` method, you will need to
|
99
|
+
configure MessageTrain to use whatever method you use:
|
100
|
+
|
101
|
+
```ruby
|
102
|
+
MessageTrain.configure do |config|
|
103
|
+
config.current_user_method = :current_subscriber
|
104
|
+
end
|
105
|
+
```
|
106
|
+
|
107
|
+
### Mixin options
|
108
|
+
|
109
|
+
The `message_train` mixin takes the following options:
|
110
|
+
|
111
|
+
<dl>
|
112
|
+
<dt>only</dt>
|
113
|
+
<dd>A symbol or array of symbols to be the only relationships used, which can include: [:sender, :recipient]</dd>
|
114
|
+
<dt>except</dt>
|
115
|
+
<dd>A symbol or array of symbols not to create relationships for, which can include: [:sender, :recipient]</dd>
|
116
|
+
<dt>valid_senders</dt>
|
117
|
+
<dd>A method name to call for a list of valid senders for this model</dd>
|
118
|
+
<dt>collectives_for_recipient</dt>
|
119
|
+
<dd>A method that, when passed @box_user, will return a collection of valid instances of this model for that @box_user to receive. Probably a scope. (e.g. it might return groups that the user is a member of)</dd>
|
120
|
+
<dt>valid_recipients</dt>
|
121
|
+
<dd>A method that returns a collection of valid recipients for this model. default: nil</dd>
|
122
|
+
<dt>name_column</dt>
|
123
|
+
<dd>The column by which to name and find this model. default: :name</dd>
|
124
|
+
<dt>slug_column</dt>
|
125
|
+
<dd>The column with the short, typeable form of the name. default: :slug</dd>
|
126
|
+
</dl>
|
127
|
+
|
128
|
+
### Smaller address book
|
129
|
+
|
130
|
+
By default, the address book will contain all objects of the
|
131
|
+
current_user_method object's model type. To change this behavior, define
|
132
|
+
an address book method on your recipient models, something like this:
|
133
|
+
|
134
|
+
```ruby
|
135
|
+
def self.valid_recipients_for(user)
|
136
|
+
# Supposing you use rolify
|
137
|
+
with_role(:friend, user)
|
138
|
+
end
|
139
|
+
```
|
140
|
+
|
141
|
+
And in your model:
|
142
|
+
|
143
|
+
```ruby
|
144
|
+
message_train address_book_method: :valid_recipients_for
|
145
|
+
```
|
146
|
+
|
147
|
+
Or in your initializer:
|
148
|
+
|
149
|
+
```ruby
|
150
|
+
config.address_book_methods[:users] = :valid_recipients_for
|
151
|
+
```
|
152
|
+
|
153
|
+
## View Helpers
|
154
|
+
|
155
|
+
### Boxes
|
156
|
+
<dl>
|
157
|
+
<dt>boxes_dropdown_list</dt>
|
158
|
+
<dd>Bootstrap navigation dropdown list of boxes. (Be sure to check thatuser is signed in before calling, or you'll get errors.)</dd>
|
159
|
+
<dt>boxes_widget</dt>
|
160
|
+
<dd>Bootstrap widget with list of boxes</dd>
|
161
|
+
<dt>box_nav_item(box)</dt>
|
162
|
+
<dd>Bootstrap list item for one box</dd>
|
163
|
+
<dt>box_list_item(box)</dt>
|
164
|
+
<dd>Bootstrap list item for one box</dd>
|
165
|
+
<dt>box_participant_name(participant)</dt>
|
166
|
+
<dd>Name of the participant, according to the method specified in yourconfiguration or model.</dd>
|
167
|
+
<dt>box_participant_slug(participant)</dt>
|
168
|
+
<dd>Slug of the participant, according to the method specified in your configuration or model.</dd>
|
169
|
+
</dl>
|
170
|
+
|
171
|
+
### Conversations
|
172
|
+
<dl>
|
173
|
+
<dt>conversation_senders(conversation)</dt>
|
174
|
+
<dd>List of senders for a given conversation</dd>
|
175
|
+
<dt>conversation_class(box, conversation)</dt>
|
176
|
+
<dd>CSS class to put on a given conversation when in a certain box</dd>
|
177
|
+
<dt>conversation_trashed_toggle(conversation)</dt>
|
178
|
+
<dd>Link to toggle trashed status of a conversation</dd>
|
179
|
+
<dt>conversation_read_toggle(conversation)</dt>
|
180
|
+
<dd>Link to toggle read status of a conversation</dd>
|
181
|
+
<dt>conversation_ignored_toggle(conversation)</dt>
|
182
|
+
<dd>Link to toggle ignored status of a conversation</dd>
|
183
|
+
<dt>conversation_deleted_toggle(conversation)</dt>
|
184
|
+
<dd>Link to toggle deleted status of a conversation</dd>
|
185
|
+
<dt>conversation_toggle(conversation, icon, mark_to_set, method, title, options = {})</dt>
|
186
|
+
<dd>Link to toggle some status of a conversation</dd>
|
187
|
+
</dl>
|
188
|
+
|
189
|
+
### Messages
|
190
|
+
<dl>
|
191
|
+
<dt>message_class(box, message)</dt>
|
192
|
+
<dd>CSS class to put on a given message when in a certain box</dd>
|
193
|
+
<dt>message_trashed_toggle(message)</dt>
|
194
|
+
<dd>Link to toggle trashed status of a message</dd>
|
195
|
+
<dt>message_read_toggle(message)</dt>
|
196
|
+
<dd>Link to toggle read status of a message</dd>
|
197
|
+
<dt>message_deleted_toggle(message)</dt>
|
198
|
+
<dd>Link to toggle ignored status of a message</dd>
|
199
|
+
<dt>message_toggle(message, icon, mark_to_set, title, options = {})</dt>
|
200
|
+
<dd>Link to toggle some status of a message</dd>
|
201
|
+
<dt>message_recipients(message)</dt>
|
202
|
+
<dd>Recipients for a given message</dd>
|
203
|
+
</dl>
|
204
|
+
|
205
|
+
## Configuration
|
206
|
+
|
207
|
+
<dl>
|
208
|
+
<dt>config.slug_columns</dt>
|
209
|
+
<dd>Usually populated by options on the `message_train` mixin for models, this contains a `Hash` of tables and their slug columns</dd>
|
210
|
+
<dt>config.name_columns</dt>
|
211
|
+
<dd>Usually populated by options on the `message_train` mixin for models, this contains a `Hash` of tables and their name columns</dd>
|
212
|
+
<dt>config.user_model</dt>
|
213
|
+
<dd>Defaults to `'User'`</dd>
|
214
|
+
<dt>config.current_user_method</dt>
|
215
|
+
<dd>Defaults to `Devise`'s `current_user`</dd>
|
216
|
+
<dt>config.user_sign_in_path</dt>
|
217
|
+
<dd>Defaults to `Devise`'s `/users/sign_in`</dd>
|
218
|
+
<dt>config.user_route_authentication_method</dt>
|
219
|
+
<dd>Defaults to `Devise`'s `:user`</dd>
|
220
|
+
<dt>config.address_book_method</dt>
|
221
|
+
<dd>Default value if `address_book_methods` doesn't have a match for thistable</dd>
|
222
|
+
<dt>config.address_book_methods</dt>
|
223
|
+
<dd>`Hash` of tables and the methods those tables use to provide atab-completion address book for that table.</dd>
|
224
|
+
<dt>config.recipient_tables</dt>
|
225
|
+
<dd>Usually populated by options on the `message_train` mixin for models,this contains a `Hash` of tables and their class names</dd>
|
226
|
+
<dt>config.collectives_for_recipient_methods</dt>
|
227
|
+
<dd>Usually populated by options on the `message_train` mixin for models,this contains a list of collectives that act as recipients through which users receive messages.</dd>
|
228
|
+
<dt>config.valid_senders_methods</dt>
|
229
|
+
<dd>Usually populated by options on the `message_train` mixin for models,this contains a `Hash` of tables and the methods that indicate which users can send messages to a given instance from that table.</dd>
|
230
|
+
<dt>config.valid_recipients_methods</dt>
|
231
|
+
<dd>Usually populated by options on the `message_train` mixin for models,this contains a `Hash` of tables and the methods that indicate which users can receive messages from a given instance from that table.</dd>
|
232
|
+
<dt>config.from_email</dt>
|
233
|
+
<dd>The email address from which notification emails are sent.</dd>
|
234
|
+
<dt>config.site_name</dt>
|
235
|
+
<dd>The name of the site, for use in notification emails.</dd>
|
236
|
+
</dl>
|
237
|
+
|
238
|
+
## Upgrading
|
239
|
+
|
240
|
+
### 0.4.0
|
241
|
+
|
242
|
+
Version 0.4.0 introduced database changes to the foreign key columns to
|
243
|
+
work with Rails 4.2.5. Let me know if you need help migrating your app to
|
244
|
+
the newly named foreign keys.
|
245
|
+
|
246
|
+
### 0.3.0
|
247
|
+
|
248
|
+
A new config variable was added for the user model, which will be used to
|
249
|
+
generate a new user if the user is anonymous.
|
250
|
+
|
251
|
+
### 0.2.0
|
252
|
+
New columns were added with version 0.2.0, so when upgrading be sure to
|
253
|
+
install the latest migrations:
|
254
|
+
|
255
|
+
```bash
|
256
|
+
rake message_train:install:migrations
|
257
|
+
```
|
258
|
+
|
259
|
+
Running this command is harmless if the migrations are already installed,
|
260
|
+
they will simply be skipped.
|
261
|
+
|
262
|
+
## Contributing to MessageTrain
|
263
|
+
|
264
|
+
* Check out the latest master to make sure the feature hasn't been
|
265
|
+
implemented or the bug hasn't been fixed yet.
|
266
|
+
* Check out the issue tracker to make sure someone already hasn't
|
267
|
+
requested it and/or contributed it.
|
268
|
+
* Fork the project.
|
269
|
+
* Start a feature/bugfix branch.
|
270
|
+
* Commit and push until you are happy with your contribution.
|
271
|
+
* Make sure to add tests for it. This is important so I don't break it
|
272
|
+
in a future version unintentionally.
|
273
|
+
* Please try not to mess with the Rakefile, version, or history. If you
|
274
|
+
want to have your own version, or is otherwise necessary, that is
|
275
|
+
fine, but please isolate to its own commit so I can cherry-pick around
|
276
|
+
it.
|
277
|
+
|
278
|
+
## Contributors
|
279
|
+
* [Karen Lundgren](https://github.com/nerakdon)
|
280
|
+
* [Chad Lundgren](https://github.com/chadlundgren)
|
281
|
+
|
282
|
+
## Copyright
|
283
|
+
|
284
|
+
Copyright (c) 2015-2017 Gem Vein. See LICENSE.txt for further details.
|