You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We use singular table names in our apps by setting ActiveRecord::Base.pluralize_table_names = false in application.rb. Baked in references to "read_marks" causes SQL errors.
Would using "#{ReadMark.table_name}" in the sql strings in the scopes instead of "read_marks" fix this issue?
The text was updated successfully, but these errors were encountered:
However, I don't like the fix, building SQL queries with LEFT JOIN, SELECT, WHERE and GROUP using ActiveRecord results in too much string interpolation. If anyone knows a cleaner way, please tell me!
We use singular table names in our apps by setting
ActiveRecord::Base.pluralize_table_names = false
in application.rb. Baked in references to "read_marks" causes SQL errors.Would using
"#{ReadMark.table_name}"
in the sql strings in the scopes instead of"read_marks"
fix this issue?The text was updated successfully, but these errors were encountered: