Skip to content

method_missing': undefined method set_table_name' #6

@danielAlbuquerque

Description

@danielAlbuquerque

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions