Project

deflect

0.0
No commit activity in last 3 years
No release in over 3 years
Automatically fix mis-pluralized model names
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.7
~> 10.0
 Project Readme

Deflect

Do you ever write Users.all when you meant User.all? Happened to me once.

Once ...

[1] pry(main)> Users.all
NameError: uninitialized constant Users
from (pry):1:in `__pry__'
[2] pry(main)> require "deflect"
=> true
[3] pry(main)> Users.all
Did you mean `User`?
  User Load (1.5ms)  SELECT "users".* FROM "users"
=> [#<User:0x007fa7b808c980
  id: 1,
  ...

FAQ

Is this a good idea?

One could argue that it's no worse of an idea than constant autoloading in the first place.