less / more

less on rails — the official LESS plugin for Ruby on Rails
http://lesscss.org
MIT License
226 stars 41 forks source link

Move init.rb file #32

Closed retospect closed 13 years ago

retospect commented 13 years ago

With Rails 3, I get these two deprecation warnings in my app when running specs.

DEPRECATION WARNING: Use toplevel init.rb; rails/init.rb is deprecated: /vagrant/vendor/plugins/more/rails/init.rb. (called from /vagrant/config/environment.rb:5) DEPRECATION WARNING: RAILS_ENV is deprecated. Please use ::Rails.env. (called from /vagrant/vendor/plugins/more/rails/init.rb:1)

To fix it, I moved init.rb one directory up, and changed the contents to read

require File.join(File.dirname(FILE), 'lib', 'less', 'controller_extension') if ::Rails.env == 'development'

retospect commented 13 years ago

See #31