Sha256: 46706292657da390a31ba8204af41b363cc846af6c02fd619cf35db8a16cd1c7

Contents?: true

Size: 674 Bytes

Versions: 13

Compression:

Stored size: 674 Bytes

Contents

# frozen_string_literal: true

module Rails
  module ConsoleMethods
    def self.include(_mod, ...)
      raise_deprecation_warning
      super
    end

    def self.method_added(_method_name)
      raise_deprecation_warning
      super
    end

    def self.raise_deprecation_warning
      Rails.deprecator.warn(<<~MSG, caller_locations(2..2))
        Extending Rails console through `Rails::ConsoleMethods` is deprecated and will be removed in Rails 8.0.
        Please directly use IRB's extension API to add new commands or helpers to the console.
        For more details, please visit: https://github.com/ruby/irb/blob/master/EXTEND_IRB.md
      MSG
    end
  end
end

Version data entries

13 entries across 13 versions & 2 rubygems

Version Path
railties-7.2.2 lib/rails/console/methods.rb
railties-7.2.1.2 lib/rails/console/methods.rb
railties-7.2.1.1 lib/rails/console/methods.rb
railties-8.0.0.beta1 lib/rails/console/methods.rb
omg-railties-8.0.0.alpha9 lib/rails/console/methods.rb
omg-railties-8.0.0.alpha8 lib/rails/console/methods.rb
omg-railties-8.0.0.alpha7 lib/rails/console/methods.rb
omg-railties-8.0.0.alpha4 lib/rails/console/methods.rb
omg-railties-8.0.0.alpha3 lib/rails/console/methods.rb
railties-7.2.1 lib/rails/console/methods.rb
railties-7.2.0 lib/rails/console/methods.rb
railties-7.2.0.rc1 lib/rails/console/methods.rb
railties-7.2.0.beta3 lib/rails/console/methods.rb