aboutsummaryrefslogtreecommitdiffstats
path: root/app/models/chouette/stop_area.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/models/chouette/stop_area.rb')
-rw-r--r--app/models/chouette/stop_area.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/app/models/chouette/stop_area.rb b/app/models/chouette/stop_area.rb
index ea1855ea8..d270a8696 100644
--- a/app/models/chouette/stop_area.rb
+++ b/app/models/chouette/stop_area.rb
@@ -10,6 +10,7 @@ module Chouette
extend Enumerize
enumerize :area_type, in: Chouette::AreaType::ALL
+ enumerize :kind, in: %i(commercial non_commercial)
with_options dependent: :destroy do |assoc|
assoc.has_many :stop_points
@@ -96,6 +97,10 @@ module Chouette
end
end
+ def local_id
+ id.to_s
+ end
+
def children_in_depth
return [] if self.children.empty?
@@ -374,5 +379,9 @@ module Chouette
return nil unless time_zone.present?
ActiveSupport::TimeZone[time_zone]&.formatted_offset
end
+
+ def commercial?
+ kind == "commercial"
+ end
end
end