Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

method_missing': undefined method set_table_name' #6

Open
danielAlbuquerque opened this issue Jan 5, 2015 · 0 comments
Open

method_missing': undefined method set_table_name' #6

danielAlbuquerque opened this issue Jan 5, 2015 · 0 comments

Comments

@danielAlbuquerque
Copy link

ADMIN/POST.RB
ActiveAdmin.register Post do

if you are using Rails 4 or Strong Parameters:

permit_params :title, :text, translations_attributes: [:locale, :title, :text, :id]

index do
# ...
translation_status
# ...
#default_actions
end

form do |f|
f.translate_inputs do |t|
t.input :title
t.input :text

  t.input :locale, as: :hidden
end
f.actions

end
end

MODELS/POST.RB
class Post < ActiveRecord::Base
active_admin_translates :title, :text do
#validates_presence_of :title
end

accepts_nested_attributes_for :translations

end

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant