st0012 / SafeFinder

When NullObject meets ActiveRecord

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

how is this different from active_null?

jmay opened this issue · comments

Yes, they are very similar, and actually it is my first time hear about it.
I think the main difference are finder methods. active_null can only be used with it's custom method find_by. But SafeFinder lets you use methods you familiar with like find, find_by_name..etc. with safely scope. (I am considering add an option for users choosing if they want to use scope or not.)
Another difference would be support for Draper, which SafeFinder doesn't have. Maybe I can add it in SafeFinder someday if people think it's necessary.
Thanks for this information 😄