Quick correction on ragion scoping to local ones
This commit is contained in:
parent
c960760964
commit
64cd896006
@ -6,7 +6,7 @@ class Region < ApplicationRecord
|
|||||||
has_many :orgas, dependent: :destroy
|
has_many :orgas, dependent: :destroy
|
||||||
|
|
||||||
default_scope { order :name }
|
default_scope { order :name }
|
||||||
scope :local, ->(*) { where url: nil }
|
scope :local, ->(*) { where url: '' }
|
||||||
scope :region, (lambda do |region|
|
scope :region, (lambda do |region|
|
||||||
return if region.nil? || region == 'all' || region.to_i.zero?
|
return if region.nil? || region == 'all' || region.to_i.zero?
|
||||||
temp = Region.find region
|
temp = Region.find region
|
||||||
|
Loading…
Reference in New Issue
Block a user