I have a model where the default scope shows only records with status set to 0:
default_scope where(status: 0)
This works fine, and when I display all the records in an ActiveAdmin page, it only the shows the ones with a status of 0. However, I would like to create another page in the admin panel that shows all the records, unscoped. Right now, I have:
ActiveAdmin.register Donation, as: "All Donations" do
scope_to :unscoped
index :title => "Donations" do
...
But I'm getting this error:
undefined method `unscoped' for #<Admin::AllDonationsController:0x007feac043d638>
This still seems to happen if I give the scope a different name in the model. How can I resolve this?