aboutsummaryrefslogtreecommitdiffstats
path: root/app/models/chouette/stop_area.rb
AgeCommit message (Collapse)Author
2018-05-28Refs #6433; Fix status filterZog
2018-05-28Refs #6433 Use ransackable scope for stop area status filtercedricnjanga
2018-04-16Refs #6539; Add helper to retrieve a timezone's full nameZog
`Paris` -> `Europe/Paris`
2018-04-10Merge pull request #438 from af83/6368-gtfs-importLuc Donnet
GTFS import (first step)
2018-04-09Refs #6367; Add metadata to other versioned modelsZog
2018-04-04Refs #6090; CustomFields inputs made easyZog
:warning: We'll have to refine this code once StopArea are linked to workgroups
2018-04-03Remove hardcoded format on line/stop_area/company registration_numbers ↵Alban Peignier
(blocks GTFS imports). Refs #6368
2018-04-03Refs #5972; Error messages more human-friendlyZog
2018-04-03Refs #5972; Don't assign a Registration Number in the formZog
This can cause a bug when several forms are opened concurently
2018-03-23Refs #6218; UI for exportsZog
2018-03-23Fix stop_area state for filter and display. Update reflex sync to use ↵Luc Donnet
confirmed_at. Refs #6141
2018-03-16Refs #6218; UI for exportsZog
2018-03-15Add StopArea#status in stop_areas#_form. Refs #60336033-stop-area-statesAlban Peignier
2018-03-15Refs #6033 Update activate and deactivate methodscedricnjanga
2018-03-14Refs #5972 @1h; Automatic registration_number generationZog
2018-03-05Refs #6068; Add some helpers in the modelsZog
2018-02-20Merge pull request #294 from af83/5863-use-shallow-urls-for-referentialsLuc Donnet
5863 Remove workbench id from the querystring
2018-02-20Refs #5863 @6h; Remove workbench id from the querystringZog
Infer it when possible, and use a nested otherwise
2018-02-20Refs #5924 @14h; Extend importersZog
Mostly add a way to override the default behaviour and process each row its own way
2018-02-20Refs #5924 @1H; Add `before` actionsZog
2018-02-20Refs #5765 @6h; Add a customizable importer mechanismZog
2018-02-06StopArea: Don't auto-initialise a value for the `kind` attributeTeddy Wing
We were getting this error on `ReferentialVehicleJourneys#index`: Feb 1 17:48:32 chouette-dev rails/chouette[18900]: Started GET "/referentials/9/vehicle_journeys" for 172.28.10.14 at 2018-02-01 17:48:32 +0100 Feb 1 17:48:32 chouette-dev rails/chouette[18900]: Processing by ReferentialVehicleJourneysController#index as HTML Feb 1 17:48:32 chouette-dev rails/chouette[18900]: Parameters: {"referential_id"=>"9"} Feb 1 17:48:32 chouette-dev rails/chouette[18900]: locale set to :fr Feb 1 17:48:32 chouette-dev rails/chouette[18900]: Rendered referential_vehicle_journeys/_filters.html.slim (37.0ms) Feb 1 17:48:32 chouette-dev rails/chouette[18900]: Rendered referential_vehicle_journeys/index.html.slim within layouts/application (54.3ms) Feb 1 17:48:32 chouette-dev rails/chouette[18900]: Completed 500 Internal Server Error in 73ms (ActiveRecord: 10.4ms) Feb 1 17:48:32 chouette-dev rails/chouette[18900]: ActionView::Template::Error (missing attribute: kind):#012 23: = f.input :published_journey_name_lteq, label: false, wrapper_html: { class: 'w45'}#012 24: .form-group.togglable#012 25: = f.label Chouette::StopArea.model_name.human.pluralize, required: false, class: 'control-label'#012 26: = f.input :stop_area_ids, collection: @all_stop_areas.select(:id, :name).order(name: :asc), checked: params[:q] && params[:q][:stop_area_ids], as: :check_boxes, label: false, label_method: lambda{|l| ("<span>" + l.name + "</span>").html_safe}, required: false, wrapper_html: { class: 'checkbox_list'}, multiple: true#012 27: .form-group.togglable#012 28: = f.label Chouette::VehicleJourney.human_attribute_name(:purchase_window), class: 'control-label'#012 29: .filter_menu#012 app/models/chouette/stop_area.rb:51:in `block in <class:StopArea>'#012 app/views/referential_vehicle_journeys/_filters.html.slim:26:in `block in _app_views_referential_vehicle_journeys__filters_html_slim__692539656386688985_47285414929500'#012 app/views/referential_vehicle_journeys/_filters.html.slim:1:in `_app_views_referential_vehicle_journeys__filters_html_slim__692539656386688985_47285414929500'#012 app/views/referential_vehicle_journeys/index.html.slim:9:in `_app_views_referential_vehicle_journeys_index_html_slim___336434325333090796_47285419865660' Feb 1 17:48:32 chouette-dev rails/chouette[18900]: Processing by ErrorsController#server_error as HTML Feb 1 17:48:32 chouette-dev rails/chouette[18900]: Parameters: {"referential_id"=>"9"} Feb 1 17:48:32 chouette-dev rails/chouette[18900]: locale set to :fr or, this one locally which is easier to read: ActiveModel::MissingAttributeError in ReferentialVehicleJourneys#index Showing .../stif-boiv/app/views/referential_vehicle_journeys/_filters.html.slim where line #44 raised: missing attribute: kind Extracted source (around line #51): after_initialize do > self.kind ||= :commercial end def self.nullable_attributes Trace of template inclusion: app/views/referential_vehicle_journeys/index.html.slim Rails.root: .../stif-boiv Application Trace | Framework Trace | Full Trace app/models/chouette/stop_area.rb:51:in `block in <class:StopArea>' app/views/referential_vehicle_journeys/_filters.html.slim:44:in `block in _app_views_referential_vehicle_journeys__filters_html_slim___131528464712770693_70134715599760' app/views/referential_vehicle_journeys/_filters.html.slim:1:in `_app_views_referential_vehicle_journeys__filters_html_slim___131528464712770693_70134715599760' app/views/referential_vehicle_journeys/index.html.slim:9:in `_app_views_referential_vehicle_journeys_index_html_slim__3124451149445015007_70134715309040' This is because on `ReferentialVehicleJourneys#index`, the StopArea filter makes this query: @all_stop_areas.select(:id, :name).order(name: :asc) Alban added a temporary fix for the release in c2bc391ee91cac70e726d188be97dd2323df0df2. After a discussion with Luc, he said we only want the initial value on the `#new` form, and we decided to take this out of the model and put it in the form template instead. Here, when a new `StopArea` is created, `:commercial` will be pre-filled in the `kind` field by default. On the `#edit` page, it should show the existing value of `kind` but not permit editing. Refs #5817
2018-02-01Refs #5758; Set a default kind for StopAreasZog
2018-02-01Refs #5758 @1h; Add localized names to StopAreasZog
2018-02-01Refs #5762; Make coordinates optional on stop areasZog
2018-01-31Fix StopArea validation breaking the specsZog
2018-01-31Refs #5750; Fix validationZog
2018-01-29Refs #5750 @1h; Manage non-commercial StopAreasZog
- Add a `kind` attribute - Hide irrelevant fields in the form
2018-01-26Refs #5750 @1h; Add a "kind" attribute to StopAreasZog
This determines if the StopArea is commercial or not The useless fields are hidden in the form for the non-commercials ones
2018-01-16Fix access to public.versions table for Line, StopArea, Network and company ↵Luc Donnet
models Refs #5605 @2
2018-01-11Refs #5535; Apply timezones during schedule calculationZog
2018-01-11Refs #5493; Show Timezone on JPs editor5493-use-tz-for-time-displayZog
2018-01-11Refs #5493 @1h; Use local time in the Journeys editorZog
We store UTC times in the database though
2018-01-10Merge pull request #194 from af83/5156-handle-long-distance-routesAlban Peignier
Handle long distance routes. Refs #5156
2018-01-10Implement StopArea#country_name. Refs #5156Alban Peignier
2018-01-10Use AreaType.label in StopArea parent type validation message. Refs #5515Alban Peignier
2018-01-10Refs #5437 @0.5h; Show country name instead of city in the journeys editorZog
When the organisation has the "long_distance_routes" features. Mind the `StopArea#country_name` method which is pending until we merge the branch which adds the countries support.
2017-12-28Add specs on StopArea parent area_type validation. Refuse parent of the same ↵5313_stop_areas_parentAlban Peignier
type. Refs #5313
2017-12-27Add validation on stop_area parent_id area_typeXinhui
Refs #5313
2017-12-26Select2 stop_area form parent_id fieldXinhui
2017-12-21Refs #5349 @1h; Deactivate StopAreas instead of destroying them5349-deactivate-stop-areasZog
- Update decorators (had to split `action_links` because of `StopPointDecorator` inheriting from `StopAreaDecorator`) - Add methods on model - Add routes - Add actions on controller (`Activatable` concern, shared with `LinesController`) - Add I18n keys
2017-12-20Add StopArea#waiting_time with support in stop_areas#index/show. Refs #5351Alban Peignier
2017-12-18Remove usage of StopArea#stop_area_type. Refs #5311Alban Peignier
2017-12-18Create Chouette::AreaType to manage available StopArea type and associated ↵Alban Peignier
i18n. Refs #5311
2017-11-28Add paper_trail to modelsXinhui
2017-11-24Take into account code reviewcedricnjanga
2017-11-22Add Cédric new objectid concernscedricnjanga
objectid_support handles reading and writing object_ids objectid_formater_support gets the right formater class include these concerns in chouette models Remove StifNetexAttributSupport modules because these are handled by the new objectid concerns Add a objectid and formater classes for each format type Add objectid formats to the factories Modify somes specs for object_ids but there are still a number of failling tests
2017-11-21Change the way we name classescedricnjanga
We now always use modules for namespaces => same structure for models, decorators, policies...
2017-11-16Add Cédric new objectid concernscedricnjanga
objectid_support handles reading and writing object_ids objectid_formater_support gets the right formater class include these concerns in chouette models Remove StifNetexAttributSupport modules because these are handled by the new objectid concerns Add a objectid and formater classes for each format type Add objectid formats to the factories Modify somes specs for object_ids but there are still a number of failling tests
2017-11-10Add validation and specs to models on objectid_format presencecedricnjanga