Rails - Business opening hours schema
<p>I have a Venue model that has_many and accept_nested_attributes_for working_hours.</p>

<p>The Working Hour model:</p>

<pre><code>create_table "working_hours", force: :cascade do |t|
  t.integer  "day"
  t.time     "open_time"
  t.time     "close_time"
  t.integer  "venue_id"
  t.datetime "created_at",  null: false
  t.datetime "updated_at",  null: false
  t.index ["merchant_id"], name: "index_working_hours_on_merchant_id", using: :btree
end
</code></pre>

<p>That way I can add more than one working_hour block per day, as:</p>

<p>Sunday 10am - 13am
Sunday 17pm - 20pm</p>

<p>I know that I can mark Sunday 17pm - 24pm and Monday 0am - 2am, but I want a finest solution. Something like the Yelp solution <a href="https://www.yelp.com/biz_attribute?biz_id=jnEv25Y2DosTq2sNnvmC9g" rel="nofollow">https://www.yelp.com/biz_attribute?biz_id=jnEv25Y2DosTq2sNnvmC9g</a></p>

<p>If you inspect element for the options select to hours they have an integer (0 and 1) to set as same day or next day.</p>

<p>how can I achieve that (ex: 20pm - 1am) ?</p>