8 changed files with 88 additions and 13 deletions
@ -0,0 +1,6 @@
|
||||
ActiveAdmin.register I18n::Backend::ActiveRecord::Translation do |
||||
# See permitted parameters documentation: |
||||
# https://github.com/gregbell/active_admin/blob/master/docs/2-resource-customization.md#setting-up-strong-parameters |
||||
# |
||||
permit_params :key, :value |
||||
end |
@ -0,0 +1,3 @@
|
||||
require 'i18n/backend/active_record' |
||||
|
||||
I18n.backend = I18n::Backend::Chain.new(I18n::Backend::ActiveRecord.new, I18n.backend) |
@ -0,0 +1,11 @@
|
||||
class CreateTranslation < ActiveRecord::Migration |
||||
def change |
||||
create_table :translations do |t| |
||||
t.string :locale |
||||
t.string :key |
||||
t.text :value |
||||
t.text :interpolations |
||||
t.boolean :is_proc, default: false |
||||
end |
||||
end |
||||
end |
Loading…
Reference in new issue