sxross / MotionModel

Simple Model and Validation Mixins for RubyMotion
MIT License
192 stars 67 forks source link

Add support for different primary_key in belongs_to associations #140

Closed awernick closed 4 months ago

awernick commented 9 years ago

Just like the title says.

I had to modify the code to work in one of my projects, but I think it would be helpful to others if this feature was included.

sxross commented 9 years ago

Thanks for the contribution. It should be valuable.

It would be great if there were a spec and a README entry. Any chance of doing that?

awernick commented 9 years ago

@sxross sure thing! Let me write it and I'll update my pull request :+1:

awernick commented 9 years ago

@sxross I updated the README to include the necessary information. I'm not too sure about the formatting though. Is there any specific way you like to organize the README?

sxross commented 9 years ago

The README looks good. If you could add some examples to spec/relation_spec.rb that we can use to assure ourselves everything is working properly, that would be great. You have the framework for that in your README example of using a foreign key.