-
Notifications
You must be signed in to change notification settings - Fork 805
Closed
Labels
Description
The behavior of Class.index_name
is not as expected when using concerns and STI:
module Searchable
extend ActiveSupport::Concern
included do
include Elasticsearch::Model
index_name "app_name-#{Rails.env}-#{table_name}"
end
end
class Post < ActiveRecord::Base
include Searchable
end
class Post::News < Post; end
puts Post.index_name
=> "appname-development-posts" [OK]
puts Post::News.index_name
=> "post-news" [Expected: "appname-development-posts"]