Skip to content

Commit

Permalink
lml#347: Fix the continue button action.
Browse files Browse the repository at this point in the history
- Add a hidden field to make sure the `save_and_lock` parameter
  expected by the controller is provided.
- Rename `AddUserSettings` => `CreateUserSettings`
- Remove `null => true` according to @Dantemss' comment.
  • Loading branch information
navilan committed Jun 15, 2014
1 parent 3f1dff0 commit ad65a41
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -77,11 +77,11 @@
<center>
<% confirm_message = "After you turn in your answer, you can no longer change it. " +
"Are you sure you want to turn in your answer?" %>
<input type="hidden" name="save_and_lock" value="true">

<div class="actions" style="padding-top:10px">
<%= f.submit "Turn in my answer",
:data => {maybeConfirm: confirm_message, setting: 'skip_answer_lockin_message'},
:name => "save_and_lock",
:class => 'link_button maybe_confirm' %>

</div>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# Copyright 2011-2014 Rice University. Licensed under the Affero General Public
# License version 3 or later. See the COPYRIGHT file for details.

class AddUserSettings < ActiveRecord::Migration
class CreateUserSettings < ActiveRecord::Migration
def change
create_table(:user_settings) do |t|
t.integer :user_id, :null => false
t.text :settings, :null => true
t.text :settings
t.timestamps
end

Expand Down

0 comments on commit ad65a41

Please sign in to comment.