Commit a7d969218fc621bd24c7ac9a72d70bfa25358d81
Committed by
Rafael Manzo
1 parent
9174ef49
Exists in
colab
and in
4 other branches
WIP: Fixing Compound Metric Configuration's create acceptance tests.
Note: The problem is probably on KalibroConfigurations. It seems it is not able to update a metric snapshot.
Showing
2 changed files
with
14 additions
and
12 deletions
Show diff stats
app/controllers/compound_metric_configurations_controller.rb
| ... | ... | @@ -3,7 +3,7 @@ class CompoundMetricConfigurationsController < BaseMetricConfigurationsControlle |
| 3 | 3 | |
| 4 | 4 | def create |
| 5 | 5 | super |
| 6 | - metric_configuration.metric.type = "CompoundMetricSnapshot" | |
| 6 | + @compound_metric_configuration.metric.type = "CompoundMetricSnapshot" | |
| 7 | 7 | respond_to do |format| |
| 8 | 8 | create_and_redir(format) |
| 9 | 9 | end | ... | ... |
app/views/compound_metric_configurations/_form.html.erb
| ... | ... | @@ -19,19 +19,21 @@ |
| 19 | 19 | </div> |
| 20 | 20 | |
| 21 | 21 | <% if @compound_metric_configuration.persisted? %> |
| 22 | - <%= hidden_field_tag(:reading_group_id, @metric_configuration.reading_group_id) %> | |
| 22 | + <%= hidden_field_tag(:reading_group_id, @metric_configuration.reading_group_id) %> | |
| 23 | + <%= hidden_field_tag(:kalibro_configuration_id, @metric_configuration.kalibro_configuration_id) %> | |
| 23 | 24 | <% else %> |
| 24 | - <div class="form-row"> | |
| 25 | - <div class="field-container"> | |
| 26 | - <%= f.label :reading_group_id, 'Reading Group', class: 'control-label' %> | |
| 27 | - <%= f.select( :reading_group_id, reading_group_options, {class: 'form-control'} ) %> | |
| 25 | + <div class="form-row"> | |
| 26 | + <div class="field-container"> | |
| 27 | + <%= f.label :reading_group_id, 'Reading Group', class: 'control-label' %> | |
| 28 | + <%= f.select( :reading_group_id, reading_group_options, {class: 'form-control'} ) %> | |
| 29 | + </div> | |
| 30 | + <div class="help-container"> | |
| 31 | + <p> | |
| 32 | + The <%= link_to 'Reading Group', tutorials_path('keywords', anchor: 'reading_group') %> associated with this metric. | |
| 33 | + </p> | |
| 34 | + </div> | |
| 28 | 35 | </div> |
| 29 | - <div class="help-container"> | |
| 30 | - <p> | |
| 31 | - The <%= link_to 'Reading Group', tutorials_path('keywords', anchor: 'reading_group') %> associated with this metric. | |
| 32 | - </p> | |
| 33 | - </div> | |
| 34 | - </div> | |
| 36 | + <%= f.hidden_field(:kalibro_configuration_id, value: @kalibro_configuration_id) %> | |
| 35 | 37 | <% end %> |
| 36 | 38 | </div> |
| 37 | 39 | </div> | ... | ... |