diff --git a/app/models/account.rb b/app/models/account.rb index b4a0b1d67..c0348e611 100644 --- a/app/models/account.rb +++ b/app/models/account.rb @@ -9,7 +9,9 @@ class Account < ActiveRecord::Base before_create do |account| unless account.account_type - account.account_type = AccountType.find_or_create_by_name("Free") + account.account_type = AccountType.find_or_create_by_name( + Growstuff::Application.config.default_account_type + ) end end diff --git a/config/application.rb b/config/application.rb index 04451a75d..0648a5322 100644 --- a/config/application.rb +++ b/config/application.rb @@ -37,6 +37,9 @@ module Growstuff # Configure the default encoding used in templates for Ruby 1.9. config.encoding = "utf-8" + # Configure a default account type + config.default_account_type = "Free" + # Configure sensitive parameters which will be filtered from the log file. config.filter_parameters += [:password]