Fixed saving Meal exposures
According to: https://stackoverflow.com/questions/34328735/imageable-type-is-not-setting-for-polymorphic-associations and https://stackoverflow.com/questions/2494452/rails-polymorphic-association-with-multiple-associations-on-the-same-model
This commit is contained in:
@@ -9,7 +9,7 @@
|
||||
<tr>
|
||||
<td style="width:100%"></td>
|
||||
<td><%= select_tag 'quantity_id',
|
||||
toggle_exposure_options(@project.meal_exposures, :diet) %></td>
|
||||
toggle_exposure_options(@project.meal_quantities, :diet) %></td>
|
||||
<td><%= submit_tag l(:button_add) %></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
1
app/views/meals/toggle_exposure.js.erb
Normal file
1
app/views/meals/toggle_exposure.js.erb
Normal file
@@ -0,0 +1 @@
|
||||
$('#meals').html('<%= j render partial: 'meals/index' %>');
|
||||
Reference in New Issue
Block a user