Skip to content

Update dependencies for newer Rails versions#39

Open
p8 wants to merge 4 commits into
nathanl:masterfrom
p8:update-dependencies
Open

Update dependencies for newer Rails versions#39
p8 wants to merge 4 commits into
nathanl:masterfrom
p8:update-dependencies

Conversation

@p8

@p8 p8 commented Jun 20, 2026

Copy link
Copy Markdown

Initialize ActionView::Base in test with required arguments

The ActionView::Base requires arguments for initializing in newer Rails
versions:

     ArgumentError:
       wrong number of arguments (given 0, expected 3)

Initialize it with with_empty_template_cache and with_view_paths just as
Rails does it:
https://github.com/rails/rails/blob/725c0a5812a61f84b44e352d2c9fc5c833471938/actionview/test/template/translation_helper_test.rb#L42-L44

Include ::ActiveModel::Conversion on search_class

::ActiveModel::Conversion requires the class_attribute method, which
isn't defined on Module:

    NoMethodError:
           undefined method 'class_attribute' for module Searchlight::Adapters::ActionView

By including it on the search_class we fix this error.

Fixes #36

p8 added 4 commits June 20, 2026 21:56
::ActiveModel::Conversion requires the class_attribute method, which
isn't defined on Module:

    NoMethodError:
           undefined method 'class_attribute' for module Searchlight::Adapters::ActionView

By including it on the search_class we fix this error.
The ActionView::Base requires arguments for initializing in newer Rails
versions:

     ArgumentError:
       wrong number of arguments (given 0, expected 3)

Initialize it with with_empty_template_cache and with_view_paths just as
Rails does it:
https://github.com/rails/rails/blob/725c0a5812a61f84b44e352d2c9fc5c833471938/actionview/test/template/translation_helper_test.rb#L42-L44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Update deps

1 participant