XPBytes / administrate-base_controller

:stars: Extends the ApplicationController in Administrate
MIT License
4 stars 2 forks source link

updates for administarte v0.17 #71

Open jcsrb opened 2 years ago

jcsrb commented 2 years ago

in order to be compatible with Administrate v0.17 i overwrote index_resources

def index_resources
      Administrate::Search.new(index_scoped_resource, dashboard, search_term).run
 end

it changed how

Screenshot 2022-04-20 at 17 16 30

as seen here https://github.com/thoughtbot/administrate/compare/v0.16.0...v0.17.0?diff=unified

they changed what the search class expects https://github.com/thoughtbot/administrate/commit/fd83fbbb125446f782d9713229c69dcc1d826843

SleeplessByte commented 2 years ago

Wanna do the PR?

synth commented 1 year ago

Woops, just hit this. Luckily the workaround is fairly easy for now. Just need to add

module Admin
  class ApplicationController < Administrate::ApplicationController

    def index_resources
      Administrate::Search.new(index_scoped_resource, dashboard, search_term).run
    end

  end
end