Skip to content

Commit 9d02589

Browse files
author
Andrea Rossi
committed
add api_attributes to country model
1 parent 21a53c4 commit 9d02589

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

models/country.rb

+9
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,16 @@
11
require 'models/concerns/geometry_concern'
2+
require 'models/concerns/api_object'
23

34
class Country < ActiveRecord::Base
45
include GeometryConcern
6+
include ApiObject
7+
8+
self.api_attributes = [
9+
:name, :iso_3, :geometry,
10+
:country_statistic, :pame_statistic,
11+
:region, :designations,
12+
:iucn_categories, :governances
13+
]
514

615
belongs_to :region
716
has_one :country_statistic

0 commit comments

Comments
 (0)