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