lib/arql/ext/hash.rb in arql-0.3.21 vs lib/arql/ext/hash.rb in arql-0.3.22
- old
+ new
@@ -10,10 +10,10 @@
sheet.add_row(row.slice(*fields).values.map(&:to_s), types: [:string] * fields.size)
end
end
if sheet_data.is_a?(Array)
- if sheet_data.size > 0 && sheet_data.first.is_a?(ActiveModel::Base)
+ if sheet_data.size > 0 && sheet_data.first.is_a?(ActiveRecord::Base)
fields = sheet_data.first.attributes.keys
sheet.add_row(fields, types: [:string] * fields.size)
sheet_data.each do |row|
sheet.add_row(row.slice(*fields).values.map(&:to_s), types: [:string] * fields.size)
end