diff options
| author | Teddy Wing | 2017-06-12 16:15:42 +0200 |
|---|---|---|
| committer | Teddy Wing | 2017-06-12 16:15:42 +0200 |
| commit | 636cc10744d4a1f3c4ff5c1579a9c83570e23f08 (patch) | |
| tree | 968d61d59237439c94e74fee3da1eba240a31a10 | |
| parent | e64d93327dbd2c3a6fcb12b411818c53a19f77d7 (diff) | |
| download | chouette-core-636cc10744d4a1f3c4ff5c1579a9c83570e23f08.tar.bz2 | |
TableBuilder#build_column_header: Remove TODOs and reference comments
Deciding that I'm finished with the cleanup of this method for now.
Suggestions for improvement:
- Remove dependency on `params`
- Figure out a way to get the name without `collection_model`
Refs #3479
| -rw-r--r-- | app/helpers/table_builder_helper.rb | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/app/helpers/table_builder_helper.rb b/app/helpers/table_builder_helper.rb index 7cdc7eabb..1642ecc8f 100644 --- a/app/helpers/table_builder_helper.rb +++ b/app/helpers/table_builder_helper.rb @@ -172,7 +172,6 @@ module TableBuilderHelper end - # TODO: clean up? def build_column_header( column, collection_model, @@ -180,10 +179,6 @@ module TableBuilderHelper sort_on, sort_direction ) - # #<ActiveRecord::Relation [#<Referential id: 4, name: "Referential Yanis Gaillard", slug: "referential_yanis_gaillard", created_at: "2017-05-02 12:37:38", updated_at: "2017-05-02 12:37:49", prefix: "c4nqg22nvt", projection_type: nil, time_zone: "Paris", bounds: nil, organisation_id: 1, geographical_bounds: nil, user_id: nil, user_name: nil, data_format: "neptune", line_referential_id: 1, stop_area_referential_id: 1, workbench_id: 1, archived_at: nil, created_from_id: nil, ready: true>, #<Referential id: 3, name: "Test Referential 2017.04.25", slug: "test_referential_20170425", created_at: "2017-04-25 10:08:49", updated_at: "2017-04-25 10:08:51", prefix: "test_referential_20170425", projection_type: "", time_zone: "Paris", bounds: "SRID=4326;POLYGON((-5.2 42.25,-5.2 51.1,8.23 51.1,...", organisation_id: 1, geographical_bounds: nil, user_id: 1, user_name: "Wing Teddy", data_format: "neptune", line_referential_id: 1, stop_area_referential_id: 1, workbench_id: 1, archived_at: nil, created_from_id: nil, ready: true>]> - # (byebug) collection.model - # Referential(id: integer, name: string, slug: string, created_at: datetime, updated_at: datetime, prefix: string, projection_type: string, time_zone: string, bounds: string, organisation_id: integer, geographical_bounds: text, user_id: integer, user_name: string, data_format: string, line_referential_id: integer, stop_area_referential_id: integer, workbench_id: integer, archived_at: datetime, created_from_id: integer, ready: boolean) - # params = {"controller"=>"workbenches", "action"=>"show", "id"=>"1", "q"=>{"archived_at_not_null"=>"1", "archived_at_null"=>"1"}} return column.name if !column.sortable direction = @@ -206,7 +201,6 @@ module TableBuilderHelper ) arrow_icons = content_tag :span, arrow_up + arrow_down, class: 'orderers' - # TODO: figure out a way to maybe explicitise the dynamicness of getting the model type from the `collection`. ( column_header_label(collection_model, column.key) + |
