title: How to convert raw string of time in Rails?
body: <p>In Rails (&gt;= 6), what would be a good way to convert raw strings representing time to an <code>ActiveSupport::Duration</code> object ? For instance, something like:</p>
  <pre><code>45 min
  1 h
  </code></pre>
  <p>I read some answers in <a href="https://stackoverflow.com/questions/4623869/ruby-with-rails-convert-a-string-of-time-into-seconds">this discussion</a>, but the issue is that the <a href="https://rubygems.org/gems/chronic/versions/0.10.2?locale=fr" rel="nofollow noreferrer">chronic</a> gem is not maintained anymore.</p>