Skip to content

Problem with sorting: private method `visit_Ransack_Nodes_Sort' called for #<Ransack::Visitor> #15

@Gee-Bee

Description

@Gee-Bee

There is an error thrown

private method `visit_Ransack_Nodes_Sort' called for #<Ransack::Visitor>

when sorting is added to ransack params.

For example these:

Post.ransack(title_cont: "foo", s: "title").result
Post.ransack(title_cont: "foo", s: "created_at").result

are throwing the error, while calling without sorting parameter

Post.ransack(title_cont: "foo").result

is working correctly.

visit_Ransack_Nodes_Sort is indeed private method in Ransack::Visitor.

irb(main):018:0> Ransack::Visitor.private_instance_methods.include?(:visit_Ransack_Nodes_Sort)
=> true

It's called here

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions