0
未定义的方法我在我的轨道模块的方法,这是我的模块轨在模块
module Searchable
extend ActiveSupport::Concern
included do
include Elasticsearch::Model
include Elasticsearch::Model::Callbacks
index_name Rails.application.class.parent_name.underscore
puts Rails.application.class.parent_name.underscore
document_type self.name.downcase
# you get an error if this shit run first
module ClassMethods
def setting_index(arguments)
settings index: {number_of_shards: 1} do
... more code ...
BTW。当我试图在第一次执行这个方法(setting_index)时出现错误。
任何人都可以解决这个问题,并给我一个明确的答复...... 感谢您的关注:)
thx its worked :) – cahyowhy