oldmoe / litestack

MIT License
1.13k stars 62 forks source link

Fix condition for loading Rails DBConsole #40

Closed sonicdes closed 1 year ago

sonicdes commented 1 year ago

The code in the condition always evaluates to true, because

if defined? Rails && defined? ActiveRecord

is equivalent to

if defined?(Rails && defined? ActiveRecord)

which is always true, because the code inside parentheses is an expression. This results in the file getting required anyway.