mercredi 3 juillet 2019

Override column_names for Model Class

I am customizing my Active admin with below code

ActiveAdmin.register Question do
  index do
    Question.column_names.each do |c|
      column c.to_sym
    end
  end
end

However, I don't want to show created_at and updated_at fields. How can I override this method for all of my Model Class to hide those two fields?

Aucun commentaire:

Enregistrer un commentaire