janko/rodauth-rails

PG::UndefinedColumn: ERROR: column "email" does not exist.

ianrandmckenzie opened this issue · 2 comments

Hi there,

First off, thanks for making this. Quite nice to have an easy in to Rodauth as a Rails dev.

I am finally trying out Rodauth Rails and am using blind_index for the Account model. I'm running into an error that has already been mentioned here:
ankane/blind_index#10

I'm having a bit of a hard time tracking down whether or not the query being a string is true or not. I can't find any string queries, but I also don't know if I should be digging through the source code here, or in the rodauth repo itself.

Any help is appreciated, but I can post on Stack Overflow instead if needed.

Thanks!

Also: This is all the console is giving me for an error:

Sequel::DatabaseError (PG::UndefinedColumn: ERROR:  column "email" does not exist
LINE 1: SELECT * FROM "accounts" WHERE (("email" = 'hi@abc.ca') AND ...
                                         ^
):
  
app/misc/rodauth_app.rb:9:in `block in <class:RodauthApp>'
janko commented

Hi, Rodauth is using Sequel for query building, and blind_index gem seems to be patching Active Record's query builder, so that patch will never be called.

A path forward would probably be making blind_index gem Sequel-compatible, but in any case it doesn't seem to be an issue that can be fixed in rodauth-rails (or Rodauth or Sequel).