diff options
author | spag <spag@golwen.net> | 2013-01-19 09:10:13 +0100 |
---|---|---|
committer | spag <spag@golwen.net> | 2013-01-19 09:10:13 +0100 |
commit | 617118f91bb77aa4cd37dc8ecfd77059818c9cec (patch) | |
tree | 34ca274cdd6a10505f1284724ba1198f6c360978 /config/initializers | |
parent | 1e290840497225c50373d0b860036505fa91e13a (diff) | |
parent | b4abd87252db53e3d79a9601cf9c581f61827f10 (diff) |
Merge branch 'develop' of github.com:amooma/GS5 into develop
Diffstat (limited to 'config/initializers')
-rw-r--r-- | config/initializers/update_gs_version_number.rb | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/config/initializers/update_gs_version_number.rb b/config/initializers/update_gs_version_number.rb index 972c480..4770858 100644 --- a/config/initializers/update_gs_version_number.rb +++ b/config/initializers/update_gs_version_number.rb @@ -2,7 +2,8 @@ # It equals the branch in git. # if !ENV['GS_VERSION'].nil? && GsParameter.table_exists? && GsParameter.get('GEMEINSCHAFT_VERSION') != ENV['GS_VERSION'] - if GsParameter.where(:name => 'GEMEINSCHAFT_VERSION').any? - GsParameter.where(:name => 'GEMEINSCHAFT_VERSION').first.update_attributes(:name => ENV['GS_VERSION']) - end + version = GsParameter.find_or_create_by_name('GEMEINSCHAFT_VERSION') + version.section = 'Generic' + version.value = ENV['GS_VERSION'] + version.save end |