aboutsummaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
Diffstat (limited to 'app')
-rw-r--r--app/models/resource.rb5
1 files changed, 3 insertions, 2 deletions
diff --git a/app/models/resource.rb b/app/models/resource.rb
index 8df106c..633258f 100644
--- a/app/models/resource.rb
+++ b/app/models/resource.rb
@@ -14,7 +14,7 @@ class Resource < ApplicationRecord
store_accessor :feature, :geometry, :properties
- validates_associated :agent
+ #validates_associated :agent
validates :name,
presence: true,
@@ -62,8 +62,9 @@ class Resource < ApplicationRecord
[:name, :summary, :description, :email, :source, :address, :postal_code, :city, :phone_number, :website].each do |prop|
# Define a reader
define_method prop do
- properties[prop.to_s]
+ feature['properties'][prop.to_s]
end
+ # Define a writer
define_method :"#{prop}=" do |v|
feature['properties'][prop.to_s] = v
end