summaryrefslogtreecommitdiff
path: root/config/initializers
diff options
context:
space:
mode:
authorStefan Wintermeyer <stefan.wintermeyer@amooma.de>2013-01-18 19:06:01 +0100
committerStefan Wintermeyer <stefan.wintermeyer@amooma.de>2013-01-18 19:06:01 +0100
commit313a6bfb2c5eddca7872bda007b7eae87306e5c6 (patch)
treea2b59b85d214b564df1259bc96302edfe014ad6c /config/initializers
parent8d1167c53e9edaf6e5a2b3e89dd4fd2a2c872dbb (diff)
Update config/initializers/update_gs_version_number.rb
Diffstat (limited to 'config/initializers')
-rw-r--r--config/initializers/update_gs_version_number.rb6
1 files changed, 4 insertions, 2 deletions
diff --git a/config/initializers/update_gs_version_number.rb b/config/initializers/update_gs_version_number.rb
index 914f007..972c480 100644
--- a/config/initializers/update_gs_version_number.rb
+++ b/config/initializers/update_gs_version_number.rb
@@ -2,5 +2,7 @@
# It equals the branch in git.
#
if !ENV['GS_VERSION'].nil? && GsParameter.table_exists? && GsParameter.get('GEMEINSCHAFT_VERSION') != ENV['GS_VERSION']
- GsParameter.where(:name => 'GEMEINSCHAFT_VERSION').first.update_attributes(:name => ENV['GS_VERSION'])
-end \ No newline at end of file
+ if GsParameter.where(:name => 'GEMEINSCHAFT_VERSION').any?
+ GsParameter.where(:name => 'GEMEINSCHAFT_VERSION').first.update_attributes(:name => ENV['GS_VERSION'])
+ end
+end