Sha256: 42033fd906a9a8d05d104a29954643da0030e26d2074cd1c30b6f7ed615bf6e7

Contents?: true

Size: 1.19 KB

Versions: 30

Compression:

Stored size: 1.19 KB

Contents

require 'action_view/record_identifier'

module ActionController
  module RecordIdentifier
    MODULE_MESSAGE = 'Calling ActionController::RecordIdentifier.%s is deprecated and ' \
      'will be removed in Rails 4.1, please call using ActionView::RecordIdentifier instead.'
    INSTANCE_MESSAGE = '%s method will no longer be included by default in controllers ' \
      'since Rails 4.1. If you would like to use it in controllers, please include ' \
      'ActionView::RecordIdentifier module.'

    def dom_id(record, prefix = nil)
      ActiveSupport::Deprecation.warn(INSTANCE_MESSAGE % 'dom_id')
      ActionView::RecordIdentifier.dom_id(record, prefix)
    end

    def dom_class(record, prefix = nil)
      ActiveSupport::Deprecation.warn(INSTANCE_MESSAGE % 'dom_class')
      ActionView::RecordIdentifier.dom_class(record, prefix)
    end

    def self.dom_id(record, prefix = nil)
      ActiveSupport::Deprecation.warn(MODULE_MESSAGE % 'dom_id')
      ActionView::RecordIdentifier.dom_id(record, prefix)
    end

    def self.dom_class(record, prefix = nil)
      ActiveSupport::Deprecation.warn(MODULE_MESSAGE % 'dom_class')
      ActionView::RecordIdentifier.dom_class(record, prefix)
    end
  end
end

Version data entries

30 entries across 30 versions & 2 rubygems

Version Path
actionpack-4.0.13 lib/action_controller/record_identifier.rb
actionpack-4.0.13.rc1 lib/action_controller/record_identifier.rb
actionpack-4.0.11.1 lib/action_controller/record_identifier.rb
actionpack-4.0.12 lib/action_controller/record_identifier.rb
actionpack-4.0.11 lib/action_controller/record_identifier.rb
actionpack-4.0.10 lib/action_controller/record_identifier.rb
actionpack-4.0.10.rc2 lib/action_controller/record_identifier.rb
actionpack-4.0.10.rc1 lib/action_controller/record_identifier.rb
actionpack-4.0.9 lib/action_controller/record_identifier.rb
actionpack-4.0.8 lib/action_controller/record_identifier.rb
actionpack-4.0.7 lib/action_controller/record_identifier.rb
actionpack-4.0.6 lib/action_controller/record_identifier.rb
actionpack-4.0.6.rc3 lib/action_controller/record_identifier.rb
actionpack-4.0.6.rc2 lib/action_controller/record_identifier.rb
actionpack-4.0.6.rc1 lib/action_controller/record_identifier.rb
actionpack-4.0.5 lib/action_controller/record_identifier.rb
actionpack-4.0.4 lib/action_controller/record_identifier.rb
actionpack-4.0.4.rc1 lib/action_controller/record_identifier.rb
actionpack-4.0.3 lib/action_controller/record_identifier.rb
actionpack-4.0.2 lib/action_controller/record_identifier.rb