Answer the question
In order to leave comments, you need to log in
What is the correct way to update data for ActsAsTaggableOn::Tag::Translation in ActiveAdmin?
I'm trying to register the ActsAsTaggableOn::Tag::Translation model to be able to translate tags.
Followed the guide https://github.com/activeadmin/activeadmin/blob/ma... which says
ActiveAdmin.register Post do
permit_params :title, :content, :publisher_id
end
ActiveAdmin.register ActsAsTaggableOn::Tag::Translation, :as => "TagTranslation" do
permit_params :name, :tag_id, :locale
end
ActiveAdmin.register ActsAsTaggableOn::Tag::Translation, :as => "TagTranslation" do
permit_params acts_as_taggable_on_tag_translation: [:name, :tag_id, :locale]
end
ActiveAdmin.register ActsAsTaggableOn::Tag::Translation, :as => "TagTranslation" do
controller do
def permit_params
params.permit! # разрешить любые
# params.permit acts_as_taggable_on_tag_translation: [:name, :tag_id, :locale]
# params.require(:acts_as_taggable_on_tag_translation).permit(:name, :tag_id, :locale)
end
end
end
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question