diff --git a/app/controllers/account_controller.rb b/app/controllers/account_controller.rb index 18fb632..7268a8a 100644 --- a/app/controllers/account_controller.rb +++ b/app/controllers/account_controller.rb @@ -27,7 +27,7 @@ class AccountController < ApplicationController def signup begin @terms_of_use = virtual_community.terms_of_use - terms_accepted = params[:user].delete(:terms_accepted) + terms_accepted = params[:user] ? params[:user].delete(:terms_accepted) : false @user = User.new(params[:user]) return unless request.post? if @terms_of_use and !terms_accepted diff --git a/app/views/account/signup.rhtml b/app/views/account/signup.rhtml index 54e9825..5a07b58 100644 --- a/app/views/account/signup.rhtml +++ b/app/views/account/signup.rhtml @@ -16,7 +16,7 @@ <% if @terms_of_use %>

<%= @terms_of_use %>

-

<%= check_box 'user', 'terms_accepted' %> +

<%= check_box_tag 'user[terms_accepted]' %>

<% end %> -- libgit2 0.21.2