Error while editing an object in Rails_Admin

0

I enter rails_admin and it works normally with users, but when I edit an activity it gives this error.

I've already researched what it can be, but I did not find anything very clear. So I'm going to put my activity model to help with the understanding, and anything is just to warn that I edit or share some specific files for better understanding.

MODEL

class Activity < ApplicationRecord belongs_to :user before_update :impedir_duplicata after_update :validar_hora after_update :deletar_anexo before_destroy :retirar_hora before_destroy :deletar_anexo mount_uploaders :documents, DocumentUploader validates :hora_computada, :titulo, :grupo, :data_evento, :local_realizacao_atividade, :relatorio, presence: true

    
asked by anonymous 29.11.2018 / 18:55

1 answer

1

I had a similar problem, but I discovered it was on Devise's behalf, and I was not authenticating. This can be a permission problem, such as a configuration. If you can, post as is the Config of your rails_admin.rb, and also the complete Traceback (the lines of errors), which the staff can analyze better.

One idea is to choose the fields that will appear for editing in RailsAdmin DSL. For example:

config.model 'Activity' do
   edit do
      field :name
      field :user
   end
end

And remember that some fields are required (not nil), and also need to be in the fields list.

    
14.01.2019 / 20:46