未定義的方法我在我的軌道模塊的方法,這是我的模塊 module Searchable
extend ActiveSupport::Concern
included do
include Elasticsearch::Model
include Elasticsearch::Model::Callbacks
index_name Rails.app
以下是我關心的控制器Concerns::V1::PlanFinding。根據base控制器和行動,它調用下面set_plan extend ActiveSupport::Concern
attr_accessor :plan, :custom_key
included do |base|
actions = case base.to_s
when "
存在協會關注我運行此代碼: self.user&.favorite(self, scope: [:watching]) if self.respond_to? user
self.team&.user.favorite(self, scope: [:watching]) if self.respond_to? team
我列入User & Team這個問題。 每次我創建一個User,我得到以
我有簡單的模塊,並將其納入到我的模型 module Inputable
extend ActiveSupport::Concern
included do
has_many :inputs, as: :inputable, dependent: :destroy
end
end
class Product < ActiveRecord::Base