I am implementing a module and including that in a my class by using the RoR ActiveSupport::Concern feature. I am using included do .... end block in that module but facing an error "wrong number of arguments(0 for 1)" for "included do" line.
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
Does included do block even needs arguments?
oh.... got it fixed...
Stupid typo mistake
extend ActiveSupport::Concerns should be Concern
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With