Class: ActiveRecord::Base
- Inherits:
-
Object
- Object
- ActiveRecord::Base
- Extended by:
- DrNicMagicModels::Validations
- Includes:
- DrNicMagicModels::MagicModel
- Defined in:
- lib/dr_nic_magic_models.rb,
lib/base.rb
Overview
load the schema TODO - add this to README - DrNicMagicModels::Schema.load_schema(true)
Class Method Summary collapse
Methods included from DrNicMagicModels::Validations
Methods included from DrNicMagicModels::MagicModel
Class Method Details
.get_unique_index_columns ⇒ Object
7 8 9 |
# File 'lib/base.rb', line 7 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 |