| Age | Commit message (Collapse) | Author | 
|---|
|  |  | 
|  |  | 
|  | Render the `costs` field of a `Chouette::Route` as JSON. This lives at:
http://stif-boiv.dev:3000/referentials/4/lines/1857/routes/7/costs.json
I want this in order to get the distance & time costs of a route so that
I can merge them with `JourneyPattern#costs` on the frontend on
`JourneyPatternsCollection#show`.
Refs #6203 | 
|  | Subtleties were that the links need to reference `StopArea`s. In
particular, the `edit` link goes to the `StopAreaReferential` path
instead of the referential-StopArea path.
Refs #5586 | 
|  |  | 
|  |  | 
|  |  | 
|  |  | 
|  | * Duplication of Route is triggered by link and UI forwarded to edit of duplicatee
     - Changing route, only POST duplicate_referential_line_route --> RoutesController#duplicate
     - Removing route       GET  duplicate_referential_line_route --> RoutesController#duplicate
     - Removing controller action RoutesController#post_duplicate
* Link in Route Decorator depends on new policy RoutePolicy#decorate?
* Adapting specs | 
|  | Send POST requests for duplication to a new controller method so we can
more easily handle them and separate setup and creation code.
Note that the test doesn't work. The `to change` part succeeds even
though it shouldn't. Still need to figure out what's going on there, but
committing this to hand off the feature to Robert.
Refs #4189 | 
|  | Build a breadcrumb. In order to do so, we need to set the `@line`
instance variable (how would I know that? I wouldn't, damn implicit
dependencies).
Refs #4189 | 
|  | Set header text in the locale files and display it on the page given the
route ID in the URL. Remove the third argument from `pageheader` because
after looking at the helper method's signature, I see that it's not
necessary.
Refs #4189 | 
|  | This method was commented out in 2012. Safe to say we can remove it. | 
|  | A couple of new routes for a form that will allow us to duplicate an
itinéraire/route inside a line.
Refs #4189 | 
|  | Update the table builder helper for the table of `Chouette::StopPoints`
on this page.
Created a new `StopPointDecorator` which unfortunately has the same code
as `StopAreaDecorator`, the only difference being that instead of using
`object`, it uses `object.stop_area`. Need to work out how to eliminate
that code duplication.
Refs #3479 | 
|  | Convert the table of `Route`s on this page to use the new table builder
helper. This gives us the links from the `RouteDecorator` in the gear
menu next to each row in the table.
Ended up removing the `route_sp` field from the `RouteDecorator` context
because it seems like we can just grab that collection directly from the
`Route` object. At first I thought about renaming it because after
coming back to this code I thought, 'what does sp mean?'. Then after
some investigation, it appears that we don't need to pass it in
explicitly. Now, no need to bother with that from the ReferentialLines
controller.
The RoutesController does create a separate `@route_sp` variable, but
this only changes the sort order of the stop points, not the contents of
the collection. Thus it seems safe to get them directly from the Route
in the decorator.
Refs #3479 | 
|  | Instead of defining the header links in the view, get them from our
decorator so we can reuse them. Need to wrap `@route` in the decorator
in the controller and pass it the necessary context in order for it to
be able to properly build links.
Move `Chouette::RouteDecorator` to the top level app/decorators/
directory and remove it from the `Chouette` namespace. I had put it
there to make it more similar to our model directory layout, but Draper
isn't intelligent enough to look in subdirectories of `decorators` when
using the `ActiveRecord::Base#decorate` method. Otherwise I suppose I
could do `Chouette::RouteDecorator.decorate(@route)`, but that seemed
not as clean since it doesn't take advantage of the default behaviour of
Draper. Now going to have to do this for the other decorators.
Refs #3479 | 
|  |  | 
|  | Nullification of foreign keys in delete route moved from an `after_destroy' to a `before_destroy' hook.
   (Motivation: Seemed like a good idea) | 
|  |  | 
|  | Refs #2839 | 
|  |  | 
|  |  | 
|  |  | 
|  | referential; in progress | 
|  |  | 
|  | Refs #2052 | 
|  | referentials#new. Refs #2052 | 
|  |  | 
|  |  | 
|  |  | 
|  |  | 
|  |  | 
|  |  | 
|  |  | 
|  |  | 
|  |  | 
|  |  | 
|  |  | 
|  |  | 
|  |  | 
|  |  | 
|  |  | 
|  |  | 
|  |  | 
|  |  | 
|  |  | 
|  |  | 
|  |  | 
|  |  |