jemcode / rails_admin_history_rollback

History rollback for rails_admin with paper_trail
https://rubygems.org/gems/rails_admin_history_rollback
MIT License
41 stars 27 forks source link

Not working on available_locales has no 'en' configuration #28

Open ash-r1 opened 2 years ago

ash-r1 commented 2 years ago

I'm using this gem with a non-English product. I realized this gem crashes without :en on I18n.available_locales like that:

I18n.available_locales = [:ja] # or something excepts :en

It crashes here:

https://github.com/jemcode/rails_admin_history_rollback/blob/c39e336e0aba75a4059dbf695b9d3d89628b7144/app/views/rails_admin/main/history.html.haml#L41

error message is:

Showing /home/ash/.anyenv/envs/rbenv/versions/3.0.3/lib/ruby/gems/3.0.0/gems/rails_admin_history_rollback-1.0.3/app/views/rails_admin/main/history.html.haml where line #41 raised:

:en is not a valid locale
ciscolive commented 2 years ago

`` d15dd7ff-0e64-478f-a3b3-6dc4401fb928 not working with rails_admin 3.0 ,can not see rollback button