MotionModel
MotionModel copied to clipboard
Undefined method 'push_relation'
The method push_has_many inside model.rb is calling a method called 'push_relation' but which is not defined at all.
def push_has_many_attr(col, *instances)
...
push_relation(_col, *_collection)
...
end
I faced this issue while trying to populate a restaurant model which has many food items. I will try to create a failing spec for the same.
Can you include your Gemfile as a comment?
My Gemfile,
gem "ProMotion", "~> 0.5.0"
gem "bubble-wrap", "~> 1.3.0"
gem "cocoapods"
gem "motion-cocoapods"
gem "motion-testflight"
gem 'motion-dryclean'
gem 'teacup'
gem 'sugarcube'
gem 'sweettea'
gem "motion_model", :git => "https://github.com/tacticiankerala/MotionModel.git"
group :spec do
gem "motion-facon"
gem "webstub", "~> 0.3.0"
end
PS: I forked motion_model yesterday to my git repository and used it because of the issue( https://github.com/sxross/MotionModel/pull/60 )
@aceofspades -- this changed in commit ffe43c2602fd3b8b7d2cf2fb0a792c3c92d82ec8. Look at model.rb:709. Can you remember what the logic was behind this? Thanks!
Unfortunately looks like there were several stacked changes in there so it might be challenging to work backward. Maybe it's best to fix this one the spec is in place.
On Jun 26, 2013, at 5:15 PM, "s.ross" [email protected] wrote:
@aceofspades -- this changed in commit ffe43c2. Can you remember what the logic was behind this? Thanks!
— Reply to this email directly or view it on GitHub.
@tacticiankerala Let us know when you're able to spec this up, thanks for the help.