Invalid source reflection macro :has_many :through

前端 未结 3 1292
野性不改
野性不改 2021-01-21 14:08

I have such angry associations: financings >- events >- subprograms >- programs. I want to get acces to last_financings from programs through all of them so code is:

<         


        
3条回答
  •  执念已碎
    2021-01-21 15:04

    The error you get is about source_reflection is an invalid association, because source for has_many through must be belongs_to, has_one or has_many without through option. So you can't use :last_actual_financings as a source.

提交回复
热议问题