diff options
| author | Teddy Wing | 2017-06-12 16:10:06 +0200 | 
|---|---|---|
| committer | Teddy Wing | 2017-06-12 16:10:06 +0200 | 
| commit | e7b663195bcf3370a4cca10d97453e62101e3f38 (patch) | |
| tree | 33723ffc5bdad2efdbec93ba4219a14bd7807fb3 /app | |
| parent | 0159b8b8127b91a4eff8bfeaccc17df9504aa3b1 (diff) | |
| download | chouette-core-e7b663195bcf3370a4cca10d97453e62101e3f38.tar.bz2 | |
TableBuilder#build_column_header: Pass `params` explicitly
I don't like that the method is using a global variable. It makes it
harder to read. Still don't like that we even use `params` in this
method. It would be a lot better if we could extricate it completely,
but I'll settle for this for now as there are other refactorings to get
to.
Refs #3479
Diffstat (limited to 'app')
| -rw-r--r-- | app/helpers/table_builder_helper.rb | 2 | 
1 files changed, 2 insertions, 0 deletions
diff --git a/app/helpers/table_builder_helper.rb b/app/helpers/table_builder_helper.rb index b61b169f1..090f78c0a 100644 --- a/app/helpers/table_builder_helper.rb +++ b/app/helpers/table_builder_helper.rb @@ -57,6 +57,7 @@ module TableBuilderHelper            hcont << content_tag(:th, build_column_header(              column,              collection.model, +            params,              params[:sort],              params[:direction]            )) @@ -174,6 +175,7 @@ module TableBuilderHelper    def build_column_header(      column,      collection_model, +    params,      sort_on,      sort_direction    )  | 
