ActiveRecord pattern for REST API & ElasticSearch