Add RPG carte source
This commit is contained in:
parent
7ffbe417f9
commit
5a8a4b393f
12 changed files with 71 additions and 5 deletions
|
@ -13,14 +13,20 @@ class GeoArea < ApplicationRecord
|
|||
:code_arr,
|
||||
:code,
|
||||
:nom,
|
||||
:commune
|
||||
:commune,
|
||||
:culture,
|
||||
:code_culture,
|
||||
:surface,
|
||||
:bio
|
||||
]
|
||||
|
||||
enum source: {
|
||||
quartier_prioritaire: 'quartier_prioritaire',
|
||||
cadastre: 'cadastre'
|
||||
cadastre: 'cadastre',
|
||||
parcelle_agricole: 'parcelle_agricole'
|
||||
}
|
||||
|
||||
scope :quartiers_prioritaires, -> { where(source: sources.fetch(:quartier_prioritaire)) }
|
||||
scope :cadastres, -> { where(source: sources.fetch(:cadastre)) }
|
||||
scope :parcelles_agricoles, -> { where(source: sources.fetch(:parcelle_agricole)) }
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue