active-hash / active_hash

A readonly ActiveRecord-esque base class that lets you use a hash, a Yaml file or a custom file as the datasource
MIT License
1.2k stars 179 forks source link

Added primary_key support for has_one same as has_many #218

Closed yujideveloper closed 2 years ago

yujideveloper commented 3 years ago

I added primary_key support for has_one association that is same as has_many association. ref. #71 And also tested foreign_key support explicitly.

yujideveloper commented 3 years ago

@kbrock What do you think this pr? Cloud you review this?

yujideveloper commented 2 years ago

@kbrock Cloud you review this? I think this is useful.

kbrock commented 2 years ago

passes test locally.

This is a standard rails method, following the same pattern