Module: ActiveRecordCSV
- Defined in:
- lib/active_record_csv.rb,
lib/active_record_csv/version.rb
Constant Summary collapse
- VERSION =
"0.1.2"
Instance Method Summary collapse
-
#from_csv!(file) ⇒ Object
Instantiate new objects from CSV and save each one.
Instance Method Details
#from_csv!(file) ⇒ Object
Instantiate new objects from CSV and save each one.
8 9 10 11 12 |
# File 'lib/active_record_csv.rb', line 8 def from_csv!(file) from_csv(file).each do |object| object.save! end end |