To migrate dynamic finders to Rails 4.1+:
find_all_by_...should becomewhere(...).find_last_by_...should becomewhere(...).last.scoped_by_...should becomewhere(...).find_or_initialize_by_...should becomefind_or_initialize_by(...).find_or_create_by_...should becomefind_or_create_by(...).
No comments:
Post a Comment