Module: Utusemi::Core::ActiveRecord::CollectionProxy
- Defined in:
- lib/utusemi/core.rb
Overview
Rails 3.x で関連モデルの named scope に対してのカラムマッピングが正常に動作するようにするためのもの
原因
product.stocks.unsold
対策
stocks
Instance Method Summary collapse
Instance Method Details
#scoped(*args, &block) ⇒ Object
253 254 255 256 257 258 |
# File 'lib/utusemi/core.rb', line 253 def scoped(*args, &block) association = @association utusemi_values = association.truthly_owner.utusemi_values return super unless utusemi_values[:flag] super.utusemi!(association.klass.model_name.singular, utusemi_values[:options]) end |