From c62b8d4d372024d989b13108394afe142e2e0763 Mon Sep 17 00:00:00 2001 From: saurabhbhatia Date: Fri, 3 Jan 2014 17:35:56 +0800 Subject: [PATCH] Disable confirmation email for guest user --- app/helpers/application_helper.rb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index a3f1bc66..dd94a1b1 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -28,9 +28,10 @@ module ApplicationHelper def create_guest_user u = nil User.without_callback(:create, :before, :initialize_desktop) do - u = User.create(:name => "guest", :email => "guest_#{Time.now.to_i}#{rand(99)}@example.com") + u = User.create(:name => "guest", :email => "guest_#{Time.now.to_i}#{rand(99)}@example.com") end - u.admin = false + u.admin = false + u.skip_confirmation! u.save(:validate => false) u end