Class: ActiveRecord::Base
- Inherits:
-
Object
- Object
- ActiveRecord::Base
- Defined in:
- lib/activerecord/base.rb
Class Method Summary collapse
Class Method Details
.get_unique_index_columns ⇒ Object
5 6 7 |
# File 'lib/activerecord/base.rb', line 5 def get_unique_index_columns self.connection.indexes(self.table_name, "#{self.name} Indexes").select { |index| index.unique && index.columns.size == 1 }.map{ |index| index.columns.first } end |