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

ActiveHash::Relation: Allow chaining multiples scopes #248

Closed andreynering closed 2 years ago

andreynering commented 2 years ago

Closes https://github.com/active-hash/active_hash/issues/247

andreynering commented 2 years ago

@kbrock Yeah, I used method_missing because I was out of other ideas on how to implement that.

If anyone has a suggestion, let me know. But this was probably the way to do it.

adampal commented 2 years ago

Nice work @andreynering I agree that scopes should be chainable so the interface is more consistent with ActiveRecord.

I don't have a better suggestion than what you've done with method missing. I'm happy to merge this.

andreynering commented 2 years ago

Hi @adampal,

Thanks for accepting my contribution! ❤️

I'd just like to remind you that you should probably push a new release soon so users can actually use this and other improvements made since the last release, which was a long time ago, about 2 and half years ago.

EDIT: Sorry for the extra noise, but I actually opened an issue about it to avoid this random comment being forgotten: #253 😉

adampal commented 2 years ago

Hey @andreynering no worries, I'll publish a new release shortly. Just wanting to finalise a couple of other pieces first. I think we'll have the new release ready to go within a week or so.

kbrock commented 2 years ago

thanks for the backup review