Module: RequireColumns::ModelAdditions::InstanceMethods
- Defined in:
- lib/require_columns/model_additions.rb
Instance Method Summary collapse
Instance Method Details
#has_required_columns ⇒ Object
19 20 21 22 |
# File 'lib/require_columns/model_additions.rb', line 19 def has_required_columns missing_columns = self.class.required_columns - self.class.column_names errors[:base] << "missing columns: #{missing_columns * ', '}" unless missing_columns.blank? end |