Open drcarrasco opened 1 year ago
Describe the bug For some reason, some classes don't have names, and this is causing the app to crash.
Reproduction steps I don't understand why my class doesn't have a name.
Expected behavior Rails Admin will work correctly.
Additional context
rails
rails_admin
I think that all instances of to_sym should be preceded by try. Is there a specific reason why try was only added to RailsAdmin::AbstractModel? https://github.com/railsadminteam/rails_admin/blob/5a958e46e8620fba320e04347d326d058c07d396/lib/rails_admin/config.rb#L215-L243
to_sym
try
RailsAdmin::AbstractModel
My code enters the Class, ConstLoadSuppressor::ConstProxy condition and crashes.
Class, ConstLoadSuppressor::ConstProxy
P.S. Adding try to the base code makes it work correctly.
Describe the bug For some reason, some classes don't have names, and this is causing the app to crash.
Reproduction steps I don't understand why my class doesn't have a name.
Expected behavior Rails Admin will work correctly.
Additional context
rails
version: 6.1rails_admin
version: 3.1.2rails_admin
npm package version: 3.1.2full stack trace
=> ["/home/danielcarrasco/.rbenv/versions/3.0.5/lib/ruby/gems/3.0.0/gems/rails_admin-3.1.2/lib/rails_admin/config.rb:233:in `model'", "/home/danielcarrasco/.rbenv/versions/3.0.5/lib/ruby/gems/3.0.0/gems/rails_admin-3.1.2/lib/rails_admin.rb:33:in `config'", "/home/danielcarrasco/.rbenv/versions/3.0.5/lib/ruby/gems/3.0.0/gems/rails_admin-3.1.2/lib/rails_admin/config/actions/index.rb:25:in `block inI think that all instances of
to_sym
should be preceded bytry
. Is there a specific reason whytry
was only added toRailsAdmin::AbstractModel
? https://github.com/railsadminteam/rails_admin/blob/5a958e46e8620fba320e04347d326d058c07d396/lib/rails_admin/config.rb#L215-L243My code enters the
Class, ConstLoadSuppressor::ConstProxy
condition and crashes.