Ошибка: `@charged? _Registered 'не допускается в качестве имени переменной экземпляра
Я получаю эту ошибку после обновления rails admin до последней версии, раньше она работала нормально.Это показывает, что ошибка в этом фрагменте кода.
scope :charged, -> { where.not(charge_transaction: nil) }
rails_admin do
object_label_method do
:uuid
end
list do
sort_by :campaign
# filters [:campaign, :uuid]
field :uuid
field :campaign do
searchable [:id, :product_name]
end
field :user do
searchable [:email, :handle, { :orders => :full_name }]
end
field :full_name
field :charged?
field :shipment_id?
scopes [nil, :currently_open, :charged, :campaign_funded_not_charged, :label_not_created, :paid_and_shipped]
end
configure :created_at do
show
end
configure :updated_at do
show
end
end
def charged?
return !self.open?
end
Вот мой вывод консоли:
NameError - `@charged?_registered' is not allowed as an instance variable name:
rails_admin (1.4.2) lib/rails_admin/config/has_fields.rb:12:in `field'
app/models/order.rb:269:in `block (2 levels) in <class:Order>'
rails_admin (1.4.2) lib/rails_admin/config/sections.rb:30:in `block (2 levels) in included'
app/models/order.rb:258:in `block in <class:Order>'
rails_admin (1.4.2) lib/rails_admin/config/lazy_model.rb:53:in `block in target'
rails_admin (1.4.2) lib/rails_admin/config/lazy_model.rb:53:in `target'
rails_admin (1.4.2) lib/rails_admin/config/lazy_model.rb:60:in `method_missing'
rails_admin (1.4.2) lib/rails_admin/config.rb:352:in `block in visible_models_with_bindings'
rails_admin (1.4.2) lib/rails_admin/config.rb:352:in `visible_models_with_bindings'
rails_admin (1.4.2) lib/rails_admin/config.rb:320:in `visible_models'
Любая идея, как я могу решить эту проблему