开发者

Ruby on Rails 3: rails_admin + puret?

开发者 https://www.devze.com 2023-03-18 00:48 出处:网络
Did someone try to integrate puret into rails_admin? I can\'t make a language switch to edit different translations :(

Did someone try to integrate puret into rails_admin? I can't make a language switch to edit different translations :( Changing开发者_运维技巧 I18n.locale forces whole rails_admin to use specified locale.


Now I got the solution. The two can work together well. In short:

Delete the pureted column(s) in your model

If you have the column pureted still in your model, rails form helper will bypass puret. That is, if a model called Post has a field called contents to be i18ned, the table posts SHOULD NOT have the column contents.

Actually we should use globalize3 instead. With this you do not need to remove the original column. And puret doens't support nested attributes assignment. globalize3 works very well.

0

精彩评论

暂无评论...
验证码 换一张
取 消