Another attempt :)
This commit is contained in:
parent
64cd896006
commit
669471aa59
@ -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: '' }
|
scope :local, ->(*) { where 'url IS NULL OR 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