diff options
author | Felipe Artur <felipefac@gmail.com> | 2016-04-21 21:55:54 +0300 |
---|---|---|
committer | Felipe Artur <felipefac@gmail.com> | 2016-05-16 20:56:32 +0300 |
commit | 71ca2de7aabf3191c4f486ca15a78a5b7f6abd94 (patch) | |
tree | f6520c7169d91aecaa3f9c3960cff11c29f5088f /db | |
parent | 78a67fc48dab434b43a080e5b15491963656661a (diff) |
Toggle email signup confirmation in admin settings
Diffstat (limited to 'db')
-rw-r--r-- | db/migrate/20160421141709_add_skip_confirmation_email_to_application_settings.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/db/migrate/20160421141709_add_skip_confirmation_email_to_application_settings.rb b/db/migrate/20160421141709_add_skip_confirmation_email_to_application_settings.rb new file mode 100644 index 00000000000..953f1cea896 --- /dev/null +++ b/db/migrate/20160421141709_add_skip_confirmation_email_to_application_settings.rb @@ -0,0 +1,8 @@ +class AddSkipConfirmationEmailToApplicationSettings < ActiveRecord::Migration + def change + #Skip confirmation emails just for new installations + default_value = User.count > 0 ? false : true + + add_column :application_settings, :skip_user_confirmation_email, :boolean, default: default_value + end +end |