| Conditions | 2 |
| Total Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | # frozen_string_literal: true |
||
| 22 | def created_at_text |
||
| 23 | active_database = Rails.configuration.database_configuration[Rails.env]["adapter"] |
||
| 24 | # Postgres requires created_at to be cast to a string |
||
| 25 | if active_database == "postgresql" |
||
| 26 | "created_at::text" |
||
| 27 | else |
||
| 28 | "created_at" |
||
| 29 | end |
||
| 30 | end |
||
| 31 | |||
| 42 |