Module: CsvRails::ActiveRecord
- Defined in:
- lib/csv_rails/active_record.rb
Defined Under Namespace
Modules: ClassMethods
Class Method Summary collapse
Class Method Details
.included(base) ⇒ Object
3 4 5 6 7 8 9 10 |
# File 'lib/csv_rails/active_record.rb', line 3 def self.included(base) base.extend(CsvRails::ActiveModel::ClassMethods) base.send(:include, CsvRails::ActiveModel::InstanceMethods) ::ActiveRecord::Relation.send(:include, CsvRails::ActiveModel::ClassMethods) unless base.respond_to?(:attribute_names) base.extend(ClassMethods) # for rails 3.0.12 end end |