Quick correction on ragion scoping to local ones

This commit is contained in:
echarp 2018-03-18 16:36:18 +01:00
parent c960760964
commit 64cd896006
1 changed files with 1 additions and 1 deletions

View File

@ -6,7 +6,7 @@ class Region < ApplicationRecord
has_many :orgas, dependent: :destroy
default_scope { order :name }
scope :local, ->(*) { where url: nil }
scope :local, ->(*) { where url: '' }
scope :region, (lambda do |region|
return if region.nil? || region == 'all' || region.to_i.zero?
temp = Region.find region