From 4a6be178332fe0c86a2de9f45dd5b78954ee9d09 Mon Sep 17 00:00:00 2001 From: MoisesMachado Date: Fri, 7 Sep 2007 22:33:02 +0000 Subject: [PATCH] ActionItem12: fixed some things in the acceptance of the terms of use --- app/controllers/account_controller.rb | 2 +- app/views/account/signup.rhtml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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