Sha256: 34065ed53446e16b1f5d014aeebf41526c6ed467e99b474775765b462d795537

Contents?: true

Size: 384 Bytes

Versions: 2

Compression:

Stored size: 384 Bytes

Contents

module ActiveRecord
  module ConnectionAdapters
    module SchemaStatements
      def index_name_with_simple(table_name, options)
        if Hash === options && options[:column]
          Array.wrap(options[:column]) * "_and_"
        else
          index_name_without_simple(table_name, options)
        end
      end

      alias_method_chain :index_name, :simple
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
activerecord-simple_index_name-0.1.0 lib/activerecord/simple_index_name/active_record_ext.rb
activerecord-simple_index_name-0.1.0.beta1 lib/activerecord/simple_index_name/active_record_ext.rb