From cb1c6c42cf0f053d52a08cb8ccdbb70a142ec5ad Mon Sep 17 00:00:00 2001 From: Zog Date: Fri, 26 Jan 2018 16:17:22 +0100 Subject: Refs #5750 @1h; Add a "kind" attribute to StopAreas This determines if the StopArea is commercial or not The useless fields are hidden in the form for the non-commercials ones --- app/models/chouette/stop_area.rb | 3 +++ db/schema.rb | 7 ++++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/app/models/chouette/stop_area.rb b/app/models/chouette/stop_area.rb index bb8747faa..69aed144b 100644 --- a/app/models/chouette/stop_area.rb +++ b/app/models/chouette/stop_area.rb @@ -11,8 +11,11 @@ module Chouette extend Enumerize enumerize :area_type, in: Chouette::AreaType::ALL enumerize :kind, in: %i(commercial non_commercial) +<<<<<<< HEAD AVAILABLE_LOCALIZATIONS = %i(gb nl de fr it es) +======= +>>>>>>> Refs #5750 @1h; Add a "kind" attribute to StopAreas with_options dependent: :destroy do |assoc| assoc.has_many :stop_points diff --git a/db/schema.rb b/db/schema.rb index 2b94f655b..ec858a14a 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -11,7 +11,7 @@ # # It's strongly recommended that you check this file into your version control system. -ActiveRecord::Schema.define(version: 20180123174450) do +ActiveRecord::Schema.define(version: 20180126134944) do # These are extensions that must be enabled in order to support this database enable_extension "plpgsql" @@ -95,6 +95,8 @@ ActiveRecord::Schema.define(version: 20180123174450) do t.integer "int_day_types" t.date "excluded_dates", array: true t.integer "workgroup_id", limit: 8 + t.integer "int_day_types" + t.date "excluded_dates", array: true end add_index "calendars", ["organisation_id"], name: "index_calendars_on_organisation_id", using: :btree @@ -794,7 +796,10 @@ ActiveRecord::Schema.define(version: 20180123174450) do t.string "stif_type" t.integer "waiting_time" t.string "kind" +<<<<<<< HEAD t.jsonb "localized_names" +======= +>>>>>>> Refs #5750 @1h; Add a "kind" attribute to StopAreas end add_index "stop_areas", ["name"], name: "index_stop_areas_on_name", using: :btree -- cgit v1.2.3