rails 6.1 ArgumentError missing keyword: locals
In rails 6.1 the gem does not work narrowed it down to lib/panoramic/resolver.rb 46
actionview (6.1.0) lib/action_view/template.rb initialize
initalize(source, identifier, handler, locals:, format: nil, variant: nil, virtual_path: nil)
the call to add is made like this
ActionView::Template.new(source, identifier, handler, details)
which does not include locals named argument
was not throwing an error in 6.0 because of default value provided
initalize(source, identifier, handler, format: nil, variant: nil, locals: nil, virtual_path: nil, updated_at: nil)
can be fixed for 6.1 like this
ActionView::Template.new(source, identifier, handler,
:locals => [],
:format => Mime[record.format].to_sym,
:virtual_path => virtual_path(record.path, record.partial))
not sure of what is needed to make it compatible with all versions
here is a pr regarding the fix for 6.1 PR 46
+1
I'm working on a rails 6.1 project, and when I add panoramic without specifying a version, bundler resolves it to 0.0.6 since 0.0.7 has a dependency on rails ~> 4
However, even when I grab version 0.0.7 on its own to peek at resolver.rb, I don't see the fix from this commit. Could you possibly publish a new version of your gem with this fix included?
I worked around this issue for now by adding the latest ref from github to the gemfile:
gem "panoramic", github: "andreapavoni/panoramic", ref: "bd766f61f32e5fcf3c050f56f6e16d49a169d025"
Anyone knows if any fix for this issue with Paranoic is released? I worked around this problem with @tweeres04 suggestion by now.