Open giulioprovasi opened 6 years ago
How should I do the following (using #13 as an example too) :
return all users who can see at least english and french content
user 1 => NULL user 2 => en
NULL
en
I assume NULL means any cause : User.first.languages => [:en, :fr, :ca] but : User.with_any_languages(:fr) => []
any
User.first.languages
[:en, :fr, :ca]
User.with_any_languages(:fr)
[]
I am using the same scope :
scope :with_any_languages, lambda { |*types_sym| where(languages_value: bitwise_union(*types_sym, 'languages')) }
Is this intended or a bug ?
@giulioprovasi, are you sure User.first.languages returns [:en, :fr, :ca]? I'm pretty sure it returns [:en, :fr, :ca, :empty].
[:en, :fr, :ca, :empty]
How should I do the following (using #13 as an example too) :
return all users who can see at least english and french content
user 1 =>
NULL
user 2 =>en
I assume NULL means
any
cause :User.first.languages
=>[:en, :fr, :ca]
but :User.with_any_languages(:fr)
=>[]
I am using the same scope :
Is this intended or a bug ?