diff options
Diffstat (limited to 'help')
-rw-r--r-- | help/app/controllers/tickets_controller.rb | 2 | ||||
-rw-r--r-- | help/test/functional/tickets_controller_test.rb | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/help/app/controllers/tickets_controller.rb b/help/app/controllers/tickets_controller.rb index d5a3da7..6562048 100644 --- a/help/app/controllers/tickets_controller.rb +++ b/help/app/controllers/tickets_controller.rb @@ -18,7 +18,7 @@ class TicketsController < ApplicationController @ticket.comments.last.posted_by = (logged_in? ? current_user.id : nil) #protecting posted_by isn't working, so this should protect it. @ticket.created_by = current_user.id if logged_in? - @ticket.email = current_user.email if logged_in? and current_user.email + @ticket.email = current_user.email_address if logged_in? and current_user.email_address flash[:notice] = 'Ticket was successfully created.' if @ticket.save diff --git a/help/test/functional/tickets_controller_test.rb b/help/test/functional/tickets_controller_test.rb index 0c462a9..f8627d8 100644 --- a/help/test/functional/tickets_controller_test.rb +++ b/help/test/functional/tickets_controller_test.rb @@ -89,7 +89,7 @@ class TicketsControllerTest < ActionController::TestCase assert_not_nil assigns(:ticket).created_by assert_equal assigns(:ticket).created_by, @current_user.id - assert_equal assigns(:ticket).email, @current_user.email + assert_equal assigns(:ticket).email, @current_user.email_address.email assert_equal 1, assigns(:ticket).comments.count assert_not_nil assigns(:ticket).comments.first.posted_by |