I have an ActiveAdmin app with a simple model that I want to persist in Elastic Search with Tire:
class Person
include Tire::Model::Persistence
property :firstName
property :lastName
end
But I get this error on the index action:
NoMethodError (undefined method `quoted_table_name' for Person:Class)
What have I missed?
First of all, I skipped a few steps enabling Tire persistence. Thanks to Chris Berkhout's post on this topic my model now looks like this:
And I needed to add a es.rake task in lib/tasks to set up the index:
And an initializer es.rb in config/initializers to define the index name:
Works a treat!
As for trying to get ActiveAdmin working with ES persistence, I see that AA is tied to ActiveRecord, though ActiveModel or an ORM-independent version is in the works.