think_feel_do_engine 3.14.2 → 3.14.3

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: 87a27bee53ec55a100c20dbd9b2102aea9b1675f
4
- data.tar.gz: e6f94f97ace1fc6b05545d9e4ba305a2fc89f632
3
+ metadata.gz: 9bca2e64476340a1c8632fa6c4a212cd3de372da
4
+ data.tar.gz: 5664e7fc5f65bd4744831b9c7553dd29841ee77e
5
5
  SHA512:
6
- metadata.gz: 3717a2bb4678d29db736dcbd06e02ce415615bf87b642c96770bb1fbf07a266601fd26f87ce43d5c912e59eb9ec9662a781d9668bad71684618ac30b4f9e420f
7
- data.tar.gz: 645338da6fdf28927ab8158bd7eec544568abfd1c19bfc7ba294298b8196eeb7b8c0e32a570a1222cada4cf53e4fc9b528b0cd4a95a0f84be92eac393fa85ac6
6
+ metadata.gz: 4894f094a057e9f2162484cce3ab6ad261110660419cd49340a2aeb1b879175ab6d4077c469cee64db13c9e0cac6d6e3685672189f16bb8a7175945142984e14
7
+ data.tar.gz: fcdd1ed0458bf361d666793e9c2215d19333d868a3b17ae0dee919fab02f87879c60f1dd14d79ecd36f7de5cb74c6a053c5b4c1bd68f13b1c4ff141a33b80c17
@@ -20,9 +20,12 @@ module ThinkFeelDoEngine
20
20
  end
21
21
 
22
22
  def new
23
- authorize! :new, Message
24
-
25
23
  @new_message = current_user.build_sent_message
24
+ authorize! :new, @new_message
25
+
26
+ @reply_recipient =
27
+ current_user.participants
28
+ .find(params[:recipient_id]) if params[:recipient_id]
26
29
 
27
30
  render(
28
31
  locals: {
@@ -8,7 +8,11 @@
8
8
  <%= form_for @new_message, url: coach_group_messages_path(@group), html: { role: "form" } do |f| %>
9
9
  <div class="form-group">
10
10
  <label for="message_recipient_id">To</label>
11
- <%= f.select :recipient_id, participants.collect { |p| [p.study_id, p.id] }, { prompt: 'Select Participant', selected: params[:recipient_id] }, class: "form-control" %>
11
+ <% if @reply_recipient %>
12
+ <%= f.hidden_field :recipient_id, value: @reply_recipient.id %><%= @reply_recipient.study_id %>
13
+ <% else %>
14
+ <%= f.select :recipient_id, participants.collect { |p| [p.study_id, p.id] }, { prompt: 'Select Participant', selected: params[:recipient_id] }, class: "form-control" %>
15
+ <% end %>
12
16
  <%= f.hidden_field :recipient_type, value: 'Participant' %>
13
17
  </div>
14
18
 
@@ -1,4 +1,4 @@
1
1
  # nodoc
2
2
  module ThinkFeelDoEngine
3
- VERSION = "3.14.2"
3
+ VERSION = "3.14.3"
4
4
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: think_feel_do_engine
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.14.2
4
+ version: 3.14.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Eric Carty-Fickes
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-03-31 00:00:00.000000000 Z
11
+ date: 2016-04-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails