Class: ActiveRecord::Base
- Inherits:
-
Object
- Object
- ActiveRecord::Base
- Defined in:
- lib/notifiable/active_record.rb
Direct Known Subclasses
Notifiable::App, Notifiable::DeviceToken, Notifiable::Notification, Notifiable::NotificationStatus
Class Method Summary collapse
Class Method Details
.bulk_insert!(record_list) ⇒ Object
5 6 7 8 9 10 11 12 13 14 15 |
# File 'lib/notifiable/active_record.rb', line 5 def self.bulk_insert!(record_list) return if record_list.empty? adapter_type = connection.adapter_name.downcase.to_sym case adapter_type when :postgresql self.connection.execute(postgresql_bulk_insert_sql(record_list)) else self.default_bulk_insert(record_list) end end |