<feed xmlns='http://www.w3.org/2005/Atom'>
<title>chouette-core/app/controllers/companies_controller.rb, branch enhanced-i18n</title>
<subtitle>Chouette manage transport static data</subtitle>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/fork/chouette-core/'/>
<entry>
<title>Refs #5586 @1.5h; Migrate more decorators</title>
<updated>2018-01-25T16:17:59+00:00</updated>
<author>
<name>Zog</name>
</author>
<published>2018-01-17T08:36:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/fork/chouette-core/commit/?id=377ddcd306fb9e61e734aaf3762e05f448938af0'/>
<id>377ddcd306fb9e61e734aaf3762e05f448938af0</id>
<content type='text'>
- Remove ApiKeyDecorator (never used)
- Migrate CalendarDecorator
- Migrate CompanyDecorator
- Migrate TimeTableDecorator
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
- Remove ApiKeyDecorator (never used)
- Migrate CalendarDecorator
- Migrate CompanyDecorator
- Migrate TimeTableDecorator
</pre>
</div>
</content>
</entry>
<entry>
<title>Use current_organisation as begin_of_association_chain in Lines/Companies/Networks/GroupOfLinesController. Refs #5102</title>
<updated>2017-12-28T07:56:05+00:00</updated>
<author>
<name>Alban Peignier</name>
</author>
<published>2017-12-28T07:50:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/fork/chouette-core/commit/?id=da60766c207ac372e2ebd1d42be7c7b9c3ee4957'/>
<id>da60766c207ac372e2ebd1d42be7c7b9c3ee4957</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Refactoring move referentialSupport from chouetteController into childrens</title>
<updated>2017-11-28T11:21:03+00:00</updated>
<author>
<name>Xinhui</name>
</author>
<published>2017-11-22T13:34:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/fork/chouette-core/commit/?id=4792a04f83f5a52757092e5b66f6d27f658c3c6b'/>
<id>4792a04f83f5a52757092e5b66f6d27f658c3c6b</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Remove breadcrumb_controller</title>
<updated>2017-10-26T09:51:07+00:00</updated>
<author>
<name>Xinhui</name>
</author>
<published>2017-10-26T09:51:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/fork/chouette-core/commit/?id=68bc446c975ff07cf2b4eb9f695da2dce93ee63d'/>
<id>68bc446c975ff07cf2b4eb9f695da2dce93ee63d</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Breadcrumb for line_referential - stop_area_referential - companies</title>
<updated>2017-10-19T14:45:19+00:00</updated>
<author>
<name>Xinhui</name>
</author>
<published>2017-10-19T14:45:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/fork/chouette-core/commit/?id=a8f4fbe9d16984fbdf2cd769b7abe4f442b56688'/>
<id>a8f4fbe9d16984fbdf2cd769b7abe4f442b56688</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix errors from JS-formatted templates using the table_builder</title>
<updated>2017-07-19T16:41:05+00:00</updated>
<author>
<name>Teddy Wing</name>
</author>
<published>2017-07-19T16:41:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/fork/chouette-core/commit/?id=37741f8bd5bc4c3698194c04bbe8aee3d7f6781a'/>
<id>37741f8bd5bc4c3698194c04bbe8aee3d7f6781a</id>
<content type='text'>
We were getting errors like these:

    Started GET "/referentials/4/networks?_=1500482065840" for 127.0.0.1 at 2017-07-19 18:34:27 +0200
    Processing by ReferentialNetworksController#index as JS
      Parameters: {"_"=&gt;"1500482065840", "referential_id"=&gt;"4"}
      User Load (3.6ms)  SELECT  "public"."users".* FROM "public"."users" WHERE "public"."users"."id" = $1  ORDER BY "public"."users"."id" ASC LIMIT 1  [["id", 1]]
    locale set to :fr
      Organisation Load (5.6ms)  SELECT  "public"."organisations".* FROM "public"."organisations" WHERE "public"."organisations"."id" = $1 LIMIT 1  [["id", 1]]
      Referential Load (1.0ms)  SELECT  "public"."referentials".* FROM "public"."referentials" WHERE "public"."referentials"."organisation_id" = $1 AND "public"."referentials"."id" = $2 LIMIT 1  [["organisation_id", 1], ["id", 4]]
      Workbench Load (0.7ms)  SELECT  "public"."workbenches".* FROM "public"."workbenches" WHERE "public"."workbenches"."id" = $1 LIMIT 1  [["id", 1]]
       (1.3ms)  SELECT DISTINCT COUNT(DISTINCT "public"."networks"."id") FROM "public"."networks" INNER JOIN "public"."line_referentials" ON "public"."networks"."line_referential_id" = "public"."line_referentials"."id" WHERE "public"."line_referentials"."id" = $1  [["id", 1]]
      CACHE (0.0ms)  SELECT DISTINCT COUNT(DISTINCT "public"."networks"."id") FROM "public"."networks" INNER JOIN "public"."line_referentials" ON "public"."networks"."line_referential_id" = "public"."line_referentials"."id" WHERE "public"."line_referentials"."id" = $1  [["id", 1]]
      Chouette::Network Load (2.3ms)  SELECT  DISTINCT "public"."networks".* FROM "public"."networks" INNER JOIN "public"."line_referentials" ON "public"."networks"."line_referential_id" = "public"."line_referentials"."id" WHERE "public"."line_referentials"."id" = $1  ORDER BY name asc LIMIT 12 OFFSET 0  [["id", 1]]
      CACHE (0.0ms)  SELECT DISTINCT COUNT(DISTINCT "public"."networks"."id") FROM "public"."networks" INNER JOIN "public"."line_referentials" ON "public"."networks"."line_referential_id" = "public"."line_referentials"."id" WHERE "public"."line_referentials"."id" = $1  [["id", 1]]
      Chouette::Network Exists (1.2ms)  SELECT  1 AS one FROM "public"."networks" WHERE "public"."networks"."id" = $1 LIMIT 1  [["id", 118]]
      Rendered referential_networks/index.html.slim (48.9ms)
    Completed 500 Internal Server Error in 184ms (ActiveRecord: 17.4ms)

    ActionView::Template::Error (undefined method `action_links' for #&lt;Chouette::Network:0x007ffea2148b08&gt;):
        22:     - if @networks.any?
        23:       .row
        24:         .col-lg-12
        25:           = table_builder_2 @networks,
        26:             [ \
        27:               TableBuilderHelper::Column.new( \
        28:                 name: 'ID Codifligne', \
      app/helpers/table_builder_helper.rb:161:in `block in build_links'
      app/helpers/table_builder_helper.rb:158:in `build_links'
      app/helpers/table_builder_helper.rb:138:in `block (3 levels) in tbody'
      app/helpers/table_builder_helper.rb:110:in `block (2 levels) in tbody'
      app/helpers/table_builder_helper.rb:108:in `block in tbody'
      app/helpers/table_builder_helper.rb:107:in `tbody'
      app/helpers/table_builder_helper.rb:72:in `table_builder_2'
      app/views/referential_networks/index.html.slim:25:in `_app_views_referential_networks_index_html_slim___1557411244315414919_70366016986820'
      app/controllers/referential_networks_controller.rb:27:in `index'

      Rendered .../lib/ruby/gems/2.3.0/gems/actionpack-4.2.8/lib/action_dispatch/middleware/templates/rescues/_trace.text.erb (1.8ms)
      Rendered .../lib/ruby/gems/2.3.0/gems/actionpack-4.2.8/lib/action_dispatch/middleware/templates/rescues/_request_and_response.text.erb (2.5ms)
      Rendered .../lib/ruby/gems/2.3.0/gems/actionpack-4.2.8/lib/action_dispatch/middleware/templates/rescues/template_error.text.erb (76.0ms)

on the following pages:

- http://stif-boiv.dev:3000/referentials/4/time_tables
- http://stif-boiv.dev:3000/line_referentials/1/companies
- http://stif-boiv.dev:3000/line_referentials/1/networks
- http://stif-boiv.dev:3000/referentials/4/companies
- http://stif-boiv.dev:3000/referentials/4/networks

This was caused by the request of a JS-formatted view that rendered the
HTML template, since the collection decoration only happened in the HTML
format section.

Do the decoration in both the HTML format and JS format for the relevant
controllers in order to eliminate this error.

Maybe there's a cleaner way to do this than just duplicating the
decoration in both `format.X` blocks, but I don't know of it. Wanted to
make sure not to decorate when it wasn't necessary, like when rendering
other formats (XML, etc.).

Refs #4105
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
We were getting errors like these:

    Started GET "/referentials/4/networks?_=1500482065840" for 127.0.0.1 at 2017-07-19 18:34:27 +0200
    Processing by ReferentialNetworksController#index as JS
      Parameters: {"_"=&gt;"1500482065840", "referential_id"=&gt;"4"}
      User Load (3.6ms)  SELECT  "public"."users".* FROM "public"."users" WHERE "public"."users"."id" = $1  ORDER BY "public"."users"."id" ASC LIMIT 1  [["id", 1]]
    locale set to :fr
      Organisation Load (5.6ms)  SELECT  "public"."organisations".* FROM "public"."organisations" WHERE "public"."organisations"."id" = $1 LIMIT 1  [["id", 1]]
      Referential Load (1.0ms)  SELECT  "public"."referentials".* FROM "public"."referentials" WHERE "public"."referentials"."organisation_id" = $1 AND "public"."referentials"."id" = $2 LIMIT 1  [["organisation_id", 1], ["id", 4]]
      Workbench Load (0.7ms)  SELECT  "public"."workbenches".* FROM "public"."workbenches" WHERE "public"."workbenches"."id" = $1 LIMIT 1  [["id", 1]]
       (1.3ms)  SELECT DISTINCT COUNT(DISTINCT "public"."networks"."id") FROM "public"."networks" INNER JOIN "public"."line_referentials" ON "public"."networks"."line_referential_id" = "public"."line_referentials"."id" WHERE "public"."line_referentials"."id" = $1  [["id", 1]]
      CACHE (0.0ms)  SELECT DISTINCT COUNT(DISTINCT "public"."networks"."id") FROM "public"."networks" INNER JOIN "public"."line_referentials" ON "public"."networks"."line_referential_id" = "public"."line_referentials"."id" WHERE "public"."line_referentials"."id" = $1  [["id", 1]]
      Chouette::Network Load (2.3ms)  SELECT  DISTINCT "public"."networks".* FROM "public"."networks" INNER JOIN "public"."line_referentials" ON "public"."networks"."line_referential_id" = "public"."line_referentials"."id" WHERE "public"."line_referentials"."id" = $1  ORDER BY name asc LIMIT 12 OFFSET 0  [["id", 1]]
      CACHE (0.0ms)  SELECT DISTINCT COUNT(DISTINCT "public"."networks"."id") FROM "public"."networks" INNER JOIN "public"."line_referentials" ON "public"."networks"."line_referential_id" = "public"."line_referentials"."id" WHERE "public"."line_referentials"."id" = $1  [["id", 1]]
      Chouette::Network Exists (1.2ms)  SELECT  1 AS one FROM "public"."networks" WHERE "public"."networks"."id" = $1 LIMIT 1  [["id", 118]]
      Rendered referential_networks/index.html.slim (48.9ms)
    Completed 500 Internal Server Error in 184ms (ActiveRecord: 17.4ms)

    ActionView::Template::Error (undefined method `action_links' for #&lt;Chouette::Network:0x007ffea2148b08&gt;):
        22:     - if @networks.any?
        23:       .row
        24:         .col-lg-12
        25:           = table_builder_2 @networks,
        26:             [ \
        27:               TableBuilderHelper::Column.new( \
        28:                 name: 'ID Codifligne', \
      app/helpers/table_builder_helper.rb:161:in `block in build_links'
      app/helpers/table_builder_helper.rb:158:in `build_links'
      app/helpers/table_builder_helper.rb:138:in `block (3 levels) in tbody'
      app/helpers/table_builder_helper.rb:110:in `block (2 levels) in tbody'
      app/helpers/table_builder_helper.rb:108:in `block in tbody'
      app/helpers/table_builder_helper.rb:107:in `tbody'
      app/helpers/table_builder_helper.rb:72:in `table_builder_2'
      app/views/referential_networks/index.html.slim:25:in `_app_views_referential_networks_index_html_slim___1557411244315414919_70366016986820'
      app/controllers/referential_networks_controller.rb:27:in `index'

      Rendered .../lib/ruby/gems/2.3.0/gems/actionpack-4.2.8/lib/action_dispatch/middleware/templates/rescues/_trace.text.erb (1.8ms)
      Rendered .../lib/ruby/gems/2.3.0/gems/actionpack-4.2.8/lib/action_dispatch/middleware/templates/rescues/_request_and_response.text.erb (2.5ms)
      Rendered .../lib/ruby/gems/2.3.0/gems/actionpack-4.2.8/lib/action_dispatch/middleware/templates/rescues/template_error.text.erb (76.0ms)

on the following pages:

- http://stif-boiv.dev:3000/referentials/4/time_tables
- http://stif-boiv.dev:3000/line_referentials/1/companies
- http://stif-boiv.dev:3000/line_referentials/1/networks
- http://stif-boiv.dev:3000/referentials/4/companies
- http://stif-boiv.dev:3000/referentials/4/networks

This was caused by the request of a JS-formatted view that rendered the
HTML template, since the collection decoration only happened in the HTML
format section.

Do the decoration in both the HTML format and JS format for the relevant
controllers in order to eliminate this error.

Maybe there's a cleaner way to do this than just duplicating the
decoration in both `format.X` blocks, but I don't know of it. Wanted to
make sure not to decorate when it wasn't necessary, like when rendering
other formats (XML, etc.).

Refs #4105
</pre>
</div>
</content>
</entry>
<entry>
<title>CompanyDecorator#action_links: Rename `line_referential` context param</title>
<updated>2017-07-12T09:06:03+00:00</updated>
<author>
<name>Teddy Wing</name>
</author>
<published>2017-07-07T15:14:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/fork/chouette-core/commit/?id=a6a3122bf1d2c2f6fc6b0f27b25b14da16a9b976'/>
<id>a6a3122bf1d2c2f6fc6b0f27b25b14da16a9b976</id>
<content type='text'>
Rename this to `referential` to be more generic. This is because we
could be passing both `Referential`s and `LineReferential`s into this
parameter.

In `CompaniesController`, we use a `LineReferential` while in
`ReferentialCompaniesController` we use `Referential`.

Refs #3479
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Rename this to `referential` to be more generic. This is because we
could be passing both `Referential`s and `LineReferential`s into this
parameter.

In `CompaniesController`, we use a `LineReferential` while in
`ReferentialCompaniesController` we use `Referential`.

Refs #3479
</pre>
</div>
</content>
</entry>
<entry>
<title>Companies#index: Use new table builder helper</title>
<updated>2017-07-12T09:06:03+00:00</updated>
<author>
<name>Teddy Wing</name>
</author>
<published>2017-07-07T14:52:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/fork/chouette-core/commit/?id=4797bfbfec8f97ef09f62d6b170b8f749be4a0bf'/>
<id>4797bfbfec8f97ef09f62d6b170b8f749be4a0bf</id>
<content type='text'>
Refs #3479
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Refs #3479
</pre>
</div>
</content>
</entry>
<entry>
<title>Refs #2596 : Replace creation_time with timestamps</title>
<updated>2017-02-13T16:39:36+00:00</updated>
<author>
<name>Vlatka Pavisic</name>
</author>
<published>2017-02-13T16:39:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/fork/chouette-core/commit/?id=49c1de150c9ef38c00247a51b91150efdd5cc3dc'/>
<id>49c1de150c9ef38c00247a51b91150efdd5cc3dc</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Refs #2476 : Disable modification and deletion of resources from another referential; in progress</title>
<updated>2017-02-07T10:25:29+00:00</updated>
<author>
<name>Vlatka Pavisic</name>
</author>
<published>2017-02-06T10:42:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/fork/chouette-core/commit/?id=d94b1271d147fdb5bbd1e616e116173198e858db'/>
<id>d94b1271d147fdb5bbd1e616e116173198e858db</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
</feed>
