enumerize

Randomly showing NoMethodError: undefined method `empty?' for 0:Fixnum

无人久伴 提交于 2019-12-04 05:34:15
问题 It works fine on my local machine but gives following error in rails_admin on Heroku, using Puma web server. Here's how I'm using enumerize enumerize :date_type, in: { last_date: 0, begin_date: 1 }, default: :last_date, predicates: { prefix: true, only: :last_date }, i18n_scope: 'date_type' And it gives following error, I've pasted error from my rollbar. Refreshing the page a few times somehow works and it displays the model page just fine. But gives error most of the time. Also, using array

Randomly showing NoMethodError: undefined method `empty?' for 0:Fixnum

给你一囗甜甜゛ 提交于 2019-12-02 11:08:06
It works fine on my local machine but gives following error in rails_admin on Heroku, using Puma web server. Here's how I'm using enumerize enumerize :date_type, in: { last_date: 0, begin_date: 1 }, default: :last_date, predicates: { prefix: true, only: :last_date }, i18n_scope: 'date_type' And it gives following error, I've pasted error from my rollbar. Refreshing the page a few times somehow works and it displays the model page just fine. But gives error most of the time. Also, using array instead of hash to define date_type, i.e. in: [:last_date, :begin_date] & not having date_type in list