naofumi-fujii/my-sample-rails

activeadmin

naofumi-fujii opened this issue · 0 comments

  column_names = @resource.column_names.map(&:to_sym)

  permitted_column_names = [
  ]

  permit_params do
    permitted_column_names
  end

  form do |f|
    inputs do
      permitted_column_names.map do |name|
        input name
      end
    end
    actions
  end

  index do
    column_names.map do |name|
      column name
    end
    actions
  end

  show do
    attributes_table do
      column_names.map do |name|
        row name
      end
    end
  end