Error editing an Object(Activity) in Rails_admin

Asked

Viewed 13 times

0

I enter rails_admin and it works normally with users, but when I edit an activity it gives this error. inserir a descrição da imagem aqui

I’ve researched what poode is, but I didn’t find anything very clear. Soon below I’ll put my model of Activity to help in understanding, and anything just warn that I edit or share some more specific file 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

1 answer

1

I had a similar problem, but I found out it was on account of the Devise, and I wasn’t authenticating. It can be a permission problem, as it can be a configuration. If you can, post 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 to edit in the 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 list of Fields.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.