method
warn_quote_duration_deprecated
rails latest stable - Class:
ActiveRecord::ConnectionAdapters::Quoting
warn_quote_duration_deprecated()private
No documentation available.
# File activerecord/lib/active_record/connection_adapters/abstract/quoting.rb, line 248
def warn_quote_duration_deprecated
ActiveRecord.deprecator.warn(<<~MSG)
Using ActiveSupport::Duration as an interpolated bind parameter in a SQL
string template is deprecated. To avoid this warning, you should explicitly
convert the duration to a more specific database type. For example, if you
want to use a duration as an integer number of seconds:
```
Record.where("duration = ?", 1.hour.to_i)
```
If you want to use a duration as an ISO 8601 string:
```
Record.where("duration = ?", 1.hour.iso8601)
```
MSG
end
end