lib/railway_ipc/models/published_message.rb in railway-ipc-5.0.0 vs lib/railway_ipc/models/published_message.rb in railway-ipc-5.1.0
- old
+ new
@@ -19,10 +19,20 @@
)
end
private
+ # rails <= 5.1 uses this method to know the name of the created_at/updated_at fields
def timestamp_attributes_for_create
super << :inserted_at
+ end
+
+ # rails >= 6.0 moved this to the class level and uses strings instead of symbols
+ class << self
+ private
+
+ def timestamp_attributes_for_create
+ super << 'inserted_at'
+ end
end
end
end