Skip to content

rails 6.1 ArgumentError missing keyword: locals #45

@abstracts33d

Description

@abstracts33d

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions