From e90c170f84ab4b91b25c673045bc0bbec0c5788a Mon Sep 17 00:00:00 2001 From: Mark Longair Date: Wed, 3 Apr 2013 15:00:59 +0100 Subject: Replace RAILS_ROOT with Rails.root for Rails 3 --- install.rb | 2 +- uninstall.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/install.rb b/install.rb index fa9dcdf..4aee9f7 100644 --- a/install.rb +++ b/install.rb @@ -1,7 +1,7 @@ # Install hook code here plugin_path = File.expand_path(File.join(File.dirname(__FILE__), "public")) -main_app_path = File.join(RAILS_ROOT, 'public', 'alavetelitheme') +main_app_path = Rails.root.join('public', 'alavetelitheme') # If the symlink to be created exists, warn the user and do nothing if File.exists?(main_app_path) diff --git a/uninstall.rb b/uninstall.rb index 82d9571..871647c 100644 --- a/uninstall.rb +++ b/uninstall.rb @@ -1,6 +1,6 @@ # Uninstall hook code here -main_app_path = File.join(RAILS_ROOT, 'public', 'alavetelitheme') +main_app_path = Rails.root.join('public', 'alavetelitheme') if File.exists?(main_app_path) && File.symlink?(main_app_path) print "Deleting symbolic link at #{main_app_path}... " File.delete(main_app_path) -- cgit v1.2.3