Sha256: 81c19f862e7e58006343736f065752a44210ecb9c8a5e5fc065f7dfe34f27d85

Contents?: true

Size: 582 Bytes

Versions: 2

Compression:

Stored size: 582 Bytes

Contents

require "active_support"

ActiveSupport.on_load :active_record do
  require "arel-mysql-index-hint/active_record-hint_methods"
  require "arel-mysql-index-hint/arel-table"
  require "arel-mysql-index-hint/arel-visitors-mysql"

  ActiveRecord::Relation.class_eval do
    include ArelMysqlIndexHint::ActiveRecordHintMethods
  end

  ActiveRecord::Querying.class_eval do
    delegate :hint, :to => :all
  end

  Arel::Table.class_eval do
    include ArelMysqlIndexHint::ArelTable
  end

  Arel::Visitors::MySQL.class_eval do
    include ArelMysqlIndexHint::ArelVisitorsMySQL
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
arel-mysql-index-hint-0.1.3 lib/arel-mysql-index-hint.rb
arel-mysql-index-hint-0.1.2 lib/arel-mysql-index-hint.rb