ruby - Rails: Scoped association resulting in error -
this question has answer here:
in model have following scoped association:
customer.rb:38
has_many :payment_informations, class_name: 'customer::paymentinformation', dependent: :destroy, -> { order(position: :asc) }
error:
syntax error, unexpected '\n', expecting =>
--
what doing wrong here? error occurs when scoping asscoiation.
try
has_many :payment_informations, -> { order(position: :asc) }, class_name: 'customer::paymentinformation', dependent: :destroy
Comments
Post a Comment