Skip to content

undefined method `tire' for class #5

@mahilock

Description

@mahilock

hi,
I just added this gem to my project and tried to execute elastic_ransack on a model but I got below error
NoMethodError: undefined method `tire' for #Class:0x0055bfe7fbdb08
I am using ruby 2.2.6 & rails 4.2
below is the console output

2.2.6 :058 > Complaint.elastic_ransack({text_cont: "ho"}, load: true) NoMethodError: undefined method tire' for #Class:0x0055bfe7fbdb08
from /home/mnd/.rvm/gems/ruby-2.2.6/gems/activerecord-4.2.4/lib/active_record/dynamic_matchers.rb:26:in method_missing' from /home/mnd/.rvm/gems/ruby-2.2.6/gems/elastic_ransack-0.0.1/lib/elastic_ransack/search.rb:100:in method_missing'
from /home/mnd/.rvm/gems/ruby-2.2.6/gems/elastic_ransack-0.0.1/lib/elastic_ransack/search.rb:42:in search' from /home/mnd/.rvm/gems/ruby-2.2.6/gems/elastic_ransack-0.0.1/lib/elastic_ransack/model.rb:44:in elastic_ransack'
from (irb):58
from /home/mnd/.rvm/gems/ruby-2.2.6/gems/railties-4.2.4/lib/rails/commands/console.rb:110:in start'

I have Complaint model as
class Complaint < ActiveRecord::Base include ElasticRansack::Model end

Please help resolving the issue

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