mirror of
https://github.com/System-End/shipment-viewer.git
synced 2026-04-19 22:05:10 +00:00
WHO HAS SPACES IN THEIR DATASET
This commit is contained in:
parent
26ab3cb98a
commit
74f9cf9222
1 changed files with 2 additions and 2 deletions
|
|
@ -25,12 +25,12 @@ class Shipment < Norairrecord::Table
|
|||
|
||||
def find_by_email(email)
|
||||
raise ArgumentError, "no email?" if email.nil? || email.empty?
|
||||
records :filter => "LOWER({#{self.email_column}})='#{email.downcase}'"
|
||||
records :filter => "LOWER(TRIM({#{self.email_column}}))='#{email.downcase}'"
|
||||
end
|
||||
|
||||
def check_for_any_by_email(email)
|
||||
raise ArgumentError, "no email?" if email.nil? || email.empty?
|
||||
records(:filter => "LOWER({#{self.email_column}})='#{email.downcase}'", fields: [], max_records: 1).any?
|
||||
records(:filter => "LOWER(TRIM({#{self.email_column}}))='#{email.downcase}'", fields: [], max_records: 1).any?
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue