RoR ActiveSupport::Concern 機能を使用して、モジュールを実装し、それをクラスに含めています。そのモジュールで include do .... end ブロックを使用していますが、「included do」行で「引数の数が間違っています (1 の場合は 0)」というエラーに直面しています。
module Icecream
extend ActiveSupport::Concerns
included do #throws error wrong no of arguments(0 for 1))
has_many :flavours
scope :icecreams, ->{where("has_icecreams = ?", true)}
end
.
.
.
.
.
end
include do ブロックには引数も必要ですか?