diff --git a/README.rdoc b/README.rdoc index 61a1969..cdba793 100644 --- a/README.rdoc +++ b/README.rdoc @@ -1,3 +1,5 @@ +=[FIXED] Moved contents of rails/init.rb into init.rb to avoid Rails 3 deprecation warnings. + = Resource Controller resource_controller makes RESTful controllers easier, more maintainable, and super readable. With the RESTful controller pattern hidden away, you can focus on what makes your controller special. diff --git a/init.rb b/init.rb index e4a03c2..5b6f0a1 100644 --- a/init.rb +++ b/init.rb @@ -1 +1,8 @@ -require File.dirname(__FILE__)+'/rails/init.rb' +require 'resource_controller' + +ActionController::Base.class_eval do + include Urligence + helper_method :smart_url + + extend ResourceController::ActionControllerExtension +end diff --git a/lib/resource_controller.rb b/lib/resource_controller.rb index 63e0c33..e895af4 100644 --- a/lib/resource_controller.rb +++ b/lib/resource_controller.rb @@ -23,4 +23,4 @@ def resource_controller(*args) end end -require File.dirname(__FILE__)+'/../rails/init.rb' unless ActionController::Base.include?(Urligence) +require File.dirname(__FILE__)+'/../init.rb' unless ActionController::Base.include?(Urligence) diff --git a/rails/init.rb b/rails/init.rb deleted file mode 100644 index 7f63084..0000000 --- a/rails/init.rb +++ /dev/null @@ -1,6 +0,0 @@ -ActionController::Base.class_eval do - include Urligence - helper_method :smart_url - - extend ResourceController::ActionControllerExtension -end diff --git a/resource_controller.gemspec b/resource_controller.gemspec index 1e7883b..90270db 100644 --- a/resource_controller.gemspec +++ b/resource_controller.gemspec @@ -65,7 +65,6 @@ Gem::Specification.new do |s| "lib/resource_controller/response_collector.rb", "lib/resource_controller/singleton.rb", "lib/urligence.rb", - "rails/init.rb", "test/Rakefile", "test/app/controllers/accounts_controller.rb", "test/app/controllers/application_controller.rb",