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

add ActiveRecord like exists? behavior. #262

Closed ise-tang closed 1 year ago

ise-tang commented 2 years ago

Currently ActiveHash::Base has exists? method but its behavior is different with ActiveRecord's one.
It seems like to be used in save method only but it is a public method. So I added ActiveRecord like behaviors and keep current behavior.

ise-tang commented 2 years ago

@kbrock How about this? If something lacks for your decision, please tell me.

ise-tang commented 2 years ago

I changed author email in each commits, so I did force push.

ise-tang commented 1 year ago

@kbrock Could you do review again?