<feed xmlns='http://www.w3.org/2005/Atom'>
<title>chouette-core, branch 5586-refactor-action-links</title>
<subtitle>Chouette manage transport static data</subtitle>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/fork/chouette-core/'/>
<entry>
<title>Merge pull request #258 from af83/5586-convert-decorators-to-new-action-links</title>
<updated>2018-01-25T18:55:42+00:00</updated>
<author>
<name>Johan Van Ryseghem</name>
</author>
<published>2018-01-25T18:55:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/fork/chouette-core/commit/?id=580c4e783767bda9e7de6a96140e8fd06650249c'/>
<id>580c4e783767bda9e7de6a96140e8fd06650249c</id>
<content type='text'>
5586 convert decorators to new action links</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
5586 convert decorators to new action links</pre>
</div>
</content>
</entry>
<entry>
<title>ComplianceControlSetDecorator: Remove unnecessary `href`s</title>
<updated>2018-01-25T16:19:22+00:00</updated>
<author>
<name>Teddy Wing</name>
</author>
<published>2018-01-25T15:30:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/fork/chouette-core/commit/?id=1555c56450b0b0c12d1aa4f5977161c193cfe0cb'/>
<id>1555c56450b0b0c12d1aa4f5977161c193cfe0cb</id>
<content type='text'>
Johan pointed out
(https://github.com/af83/stif-boiv/commit/cd2892277df0af1e1eaf2373adf0068a77f07a6e)
that these `href`s aren't needed as the action links decorator will
infer them automatically.

Refs #5586
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Johan pointed out
(https://github.com/af83/stif-boiv/commit/cd2892277df0af1e1eaf2373adf0068a77f07a6e)
that these `href`s aren't needed as the action links decorator will
infer them automatically.

Refs #5586
</pre>
</div>
</content>
</entry>
<entry>
<title>ImportResources#index: Get rid of `ImportResourceDecorator`</title>
<updated>2018-01-25T16:19:22+00:00</updated>
<author>
<name>Teddy Wing</name>
</author>
<published>2018-01-25T15:14:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/fork/chouette-core/commit/?id=988d074946990dc72e41af4d5fa1839fdb39d59e'/>
<id>988d074946990dc72e41af4d5fa1839fdb39d59e</id>
<content type='text'>
Seems like the object decorator for `ImportResource` isn't needed here.
It doesn't contain anything except for an empty `action_links` method,
which I'm guessing was to appease the table builder which used to expect
one.

Get rid of that decorator because it doesn't seem to be needed.

Also get rid of the `links` argument to the table builder because we
don't need it any more with the new action links interface.

Refs #5586
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Seems like the object decorator for `ImportResource` isn't needed here.
It doesn't contain anything except for an empty `action_links` method,
which I'm guessing was to appease the table builder which used to expect
one.

Get rid of that decorator because it doesn't seem to be needed.

Also get rid of the `links` argument to the table builder because we
don't need it any more with the new action links interface.

Refs #5586
</pre>
</div>
</content>
</entry>
<entry>
<title>ComplianceCheckSets#executed: Don't decorate `ComplianceCheck`s</title>
<updated>2018-01-25T16:19:22+00:00</updated>
<author>
<name>Teddy Wing</name>
</author>
<published>2018-01-25T15:02:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/fork/chouette-core/commit/?id=d4674437a48af8d8d388b6e122bf46cc437d12ff'/>
<id>d4674437a48af8d8d388b6e122bf46cc437d12ff</id>
<content type='text'>
No action links are used on these objects and the decorator isn't being
used for anything else. Seems to me like this collection doesn't need to
be decorated at all. Get rid of the decorator.

Add a `decorates` to `ComplianceCheckSetDecorator` because
http://stif-boiv.dev:3000/workbenches/1/compliance_check_sets/14/executed
causes an uninferrable thing error.

Refs #5586
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
No action links are used on these objects and the decorator isn't being
used for anything else. Seems to me like this collection doesn't need to
be decorated at all. Get rid of the decorator.

Add a `decorates` to `ComplianceCheckSetDecorator` because
http://stif-boiv.dev:3000/workbenches/1/compliance_check_sets/14/executed
causes an uninferrable thing error.

Refs #5586
</pre>
</div>
</content>
</entry>
<entry>
<title>ComplianceCheckSetDecorator: Convert to new action links interface</title>
<updated>2018-01-25T16:19:22+00:00</updated>
<author>
<name>Teddy Wing</name>
</author>
<published>2018-01-25T14:27:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/fork/chouette-core/commit/?id=6d682ae928eb89d083b05279ee0f6f97a3bebf23'/>
<id>6d682ae928eb89d083b05279ee0f6f97a3bebf23</id>
<content type='text'>
Refs #5586
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Refs #5586
</pre>
</div>
</content>
</entry>
<entry>
<title>ComplianceControlDecorator: Convert to new action links interface</title>
<updated>2018-01-25T16:18:03+00:00</updated>
<author>
<name>Teddy Wing</name>
</author>
<published>2018-01-25T14:09:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/fork/chouette-core/commit/?id=9f6c7a5372d960eea49f5428975d7a92f6f91d33'/>
<id>9f6c7a5372d960eea49f5428975d7a92f6f91d33</id>
<content type='text'>
* Decorate the `ComplianceControl` so we can show the action links from
  the decorator in the header.
* Add a `decorates` to get `object_class` to work inside the decorator.
* Define `AF83::Decorator.define_instance_class_method` in order to
  enable the `@compliance_control.class.METHOD` calls in the view to
  work. Thanks very much to Johan for figuring out a way to do that.

Refs #5586
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* Decorate the `ComplianceControl` so we can show the action links from
  the decorator in the header.
* Add a `decorates` to get `object_class` to work inside the decorator.
* Define `AF83::Decorator.define_instance_class_method` in order to
  enable the `@compliance_control.class.METHOD` calls in the view to
  work. Thanks very much to Johan for figuring out a way to do that.

Refs #5586
</pre>
</div>
</content>
</entry>
<entry>
<title>ComplianceControlDecorator: Convert to new action links interface</title>
<updated>2018-01-25T16:18:03+00:00</updated>
<author>
<name>Teddy Wing</name>
</author>
<published>2018-01-25T13:01:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/fork/chouette-core/commit/?id=2bf4cf2e3a9e54bc9b91bf3efcac721951df730d'/>
<id>2bf4cf2e3a9e54bc9b91bf3efcac721951df730d</id>
<content type='text'>
I was getting this error:

    ActionView::Template::Error (undefined method `split' for nil:NilClass
    Did you mean?  split_all):
        16:
        17:   / compliance controls without block
        18:   = render_compliance_control_block
        19:   = render_compliance_controls(@direct_compliance_controls)
        20:
        21:   / compliance controls with block
        22:   - if params[:q] &amp;&amp; params[:q][:compliance_control_block_id_eq_any].try(:present?)
      app/helpers/table_builder_helper.rb:110:in `item_row_class_name'
      app/helpers/table_builder_helper.rb:290:in `tbody'
      app/helpers/table_builder_helper.rb:97:in `table_builder_2'
      app/helpers/compliance_control_sets_helper.rb:79:in `block in render_table_builder'
      app/helpers/compliance_control_sets_helper.rb:78:in `render_table_builder'
      app/helpers/compliance_control_sets_helper.rb:71:in `block (2 levels) in render_compliance_controls'
      app/helpers/compliance_control_sets_helper.rb:70:in `block in render_compliance_controls'
      app/helpers/compliance_control_sets_helper.rb:69:in `render_compliance_controls'
      app/views/compliance_control_sets/show.html.slim:19:in `_app_views_compliance_control_sets_show_html_slim___3528509151208629266_70279137561480'

The model name wasn't accessible from the view because this collection
is set up in an unorthodox way without a decorated collection.

Got help from Johan, and we ended up using the `model` param passed into
the table builder for this. It looks terrible with `model` all over the
place, but at least it gets us past the problem.

Refs #5586
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
I was getting this error:

    ActionView::Template::Error (undefined method `split' for nil:NilClass
    Did you mean?  split_all):
        16:
        17:   / compliance controls without block
        18:   = render_compliance_control_block
        19:   = render_compliance_controls(@direct_compliance_controls)
        20:
        21:   / compliance controls with block
        22:   - if params[:q] &amp;&amp; params[:q][:compliance_control_block_id_eq_any].try(:present?)
      app/helpers/table_builder_helper.rb:110:in `item_row_class_name'
      app/helpers/table_builder_helper.rb:290:in `tbody'
      app/helpers/table_builder_helper.rb:97:in `table_builder_2'
      app/helpers/compliance_control_sets_helper.rb:79:in `block in render_table_builder'
      app/helpers/compliance_control_sets_helper.rb:78:in `render_table_builder'
      app/helpers/compliance_control_sets_helper.rb:71:in `block (2 levels) in render_compliance_controls'
      app/helpers/compliance_control_sets_helper.rb:70:in `block in render_compliance_controls'
      app/helpers/compliance_control_sets_helper.rb:69:in `render_compliance_controls'
      app/views/compliance_control_sets/show.html.slim:19:in `_app_views_compliance_control_sets_show_html_slim___3528509151208629266_70279137561480'

The model name wasn't accessible from the view because this collection
is set up in an unorthodox way without a decorated collection.

Got help from Johan, and we ended up using the `model` param passed into
the table builder for this. It looks terrible with `model` all over the
place, but at least it gets us past the problem.

Refs #5586
</pre>
</div>
</content>
</entry>
<entry>
<title>ComplianceControlSetDecorator: Convert to new action links interface</title>
<updated>2018-01-25T16:18:03+00:00</updated>
<author>
<name>Teddy Wing</name>
</author>
<published>2018-01-25T12:11:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/fork/chouette-core/commit/?id=9ee14d84ccfd19fb6a53c83826f352088f06b57c'/>
<id>9ee14d84ccfd19fb6a53c83826f352088f06b57c</id>
<content type='text'>
Refs #5586
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Refs #5586
</pre>
</div>
</content>
</entry>
<entry>
<title>ImportDecorator: Fix `#import_status_css_class`</title>
<updated>2018-01-25T16:18:03+00:00</updated>
<author>
<name>Teddy Wing</name>
</author>
<published>2018-01-25T11:46:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/fork/chouette-core/commit/?id=9a0a0a8398eda742df6793b6981bef037968604d'/>
<id>9a0a0a8398eda742df6793b6981bef037968604d</id>
<content type='text'>
When I converted this decorator to use the new action links interface, I
inadvertently broke this decorated method. This caused the
http://stif-boiv.dev:3000/workbenches/1/imports/1 page to break. Fix it
by using the `define_instance_method` in `AF83::Decorator`.

Refs #5586
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When I converted this decorator to use the new action links interface, I
inadvertently broke this decorated method. This caused the
http://stif-boiv.dev:3000/workbenches/1/imports/1 page to break. Fix it
by using the `define_instance_method` in `AF83::Decorator`.

Refs #5586
</pre>
</div>
</content>
</entry>
<entry>
<title>imports/index.html.slim: Remove unnecessary `links` field</title>
<updated>2018-01-25T16:18:03+00:00</updated>
<author>
<name>Teddy Wing</name>
</author>
<published>2018-01-25T11:44:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/fork/chouette-core/commit/?id=fe4aaf1fd512882c1767e63b8fe936186b95f295'/>
<id>fe4aaf1fd512882c1767e63b8fe936186b95f295</id>
<content type='text'>
This is no longer needed thanks to the new action links interface.

Refs #5586
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This is no longer needed thanks to the new action links interface.

Refs #5586
</pre>
</div>
</content>
</entry>
</feed>
