Skip to content

Commit

Permalink
Ensure inserted journals are marked Modified
Browse files Browse the repository at this point in the history
For #128
  • Loading branch information
asilano committed Mar 13, 2016
1 parent 2ae66cc commit b3259ad
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/controllers/journals_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,6 @@ def set_journal

# Only allow a trusted parameter "white list" through.
def journal_params
params[:journal].permit :game_id, :event, :order
params[:journal].permit :game_id, :event, :order, :modified
end
end
2 changes: 1 addition & 1 deletion app/views/games/show.html.slim
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ h2= @game.name
{
var newLi = $('<li class="journal">').insertBefore($(this).parent()); //'
var bipField = $("#{escape_javascript best_in_place(Journal.new, :event, class: 'change_journal', method: 'post', html_attrs: {style: 'width: 100%', autocomplete: 'off'})}");
bipField.attr('data-bip-other-fields', $.param({journal: {order: $(this).data('order')}}));
bipField.attr('data-bip-other-fields', $.param({game_id: #{@game.id}, journal: {modified: true, order: $(this).data('order')}}));
bipField.insertAfter(newLi);
bipField.best_in_place().click();
});
Expand Down

0 comments on commit b3259ad

Please sign in to comment.