Closed lmcglohon closed 7 years ago
Using code from HM (https://github.com/hudmol/nla_accession_reports/blob/master/frontend/plugin_init.rb), here is the fix:
in the plugin_init.rb file, replace:
ArchivesSpace::Application.extend_aspace_routes(File.join(File.dirname(FILE), "routes.rb"))
with:
`if ArchivesSpace::Application.respond_to?(:extend_aspace_routes)
ArchivesSpace::Application.extend_aspace_routes(File.join(File.dirname(FILE), "routes.rb")) else
my_routes = [File.join(File.dirname(FILE), "routes.rb")] ArchivesSpace::Application.config.paths['config/routes'].concat(my_routes) end`
see note in PR #3
Using code from HM (https://github.com/hudmol/nla_accession_reports/blob/master/frontend/plugin_init.rb), here is the fix:
in the plugin_init.rb file, replace:
ArchivesSpace::Application.extend_aspace_routes(File.join(File.dirname(FILE), "routes.rb"))
with:
`if ArchivesSpace::Application.respond_to?(:extend_aspace_routes)
> v2.0 way of defining routes
ArchivesSpace::Application.extend_aspace_routes(File.join(File.dirname(FILE), "routes.rb")) else
< v2.0 way of defining routes
my_routes = [File.join(File.dirname(FILE), "routes.rb")] ArchivesSpace::Application.config.paths['config/routes'].concat(my_routes) end`