[refs #265] fixed check rails env

This commit is contained in:
Alexander Machehin 2012-03-15 18:10:10 +06:00
parent e30cc70728
commit e7ac387466
1 changed files with 1 additions and 1 deletions

View File

@ -262,7 +262,7 @@ class Project < ActiveRecord::Base
end
def write_hook
is_production = ENV['RAILS_ENV'] == 'production'
is_production = Rails.env == "production"
hook = File.join(::Rails.root.to_s, 'tmp', "post-receive-hook")
FileUtils.cp(File.join(::Rails.root.to_s, 'bin', "post-receive-hook.partial"), hook)
File.open(hook, 'a') do |f|