未定义的方法我在我的轨道模块的方法,这是我的模块 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