Permalink
Browse files

Deprecate ActionController::RecordIdentifier

  • Loading branch information...
1 parent 8ca1792 commit 4efad291c11a7c4fcf178fbb887b4845eaf61757 @drogus drogus committed Aug 11, 2012
Showing with 12 additions and 0 deletions.
  1. +4 −0 actionpack/lib/action_controller.rb
  2. +8 −0 actionpack/lib/action_controller/record_identifier.rb
@@ -46,6 +46,10 @@ module ActionController
autoload :TestCase, 'action_controller/test_case'
autoload :TemplateAssertions, 'action_controller/test_case'
+ eager_autoload do
+ autoload :RecordIdentifier
+ end
+
def self.eager_load!
super
ActionController::Caching.eager_load!
@@ -0,0 +1,8 @@
+require 'active_support/deprecation'
+require 'action_view/record_identifier'
+
+module ActionController
+ RecordIdentifier = ActionView::RecordIdentifier
+ ActiveSupport::Deprecation.warn "ActionController::RecordIdentifier was renamed to ActionView::RecordIdentifier. " +
+ "Please use it instead. ActionController::RecordIdentifier will be removed in Rails 4.1"
+end

0 comments on commit 4efad29

Please sign in to comment.