From 650f24099d0bcd44fa09be515183ed34464682d5 Mon Sep 17 00:00:00 2001 From: Lucy Date: Wed, 3 Jul 2013 11:04:42 +0100 Subject: [PATCH] Added default account type of "Free" in config/applications.rb --- app/models/account.rb | 4 +++- config/application.rb | 3 +++ 2 files changed, 6 insertions(+), 1 deletion(-) 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]