aboutsummaryrefslogtreecommitdiffstats
path: root/app
diff options
context:
space:
mode:
authorGuillaume2017-09-28 11:01:41 +0200
committerGuillaume2017-09-28 11:01:41 +0200
commit9b83abfc89b9b1bb1d55f8728ecf7d59ac971b99 (patch)
tree4f3d7fc1c7e2264e757b656de0cbb560596732e1 /app
parentefce9eac3812c005409ce87028877e4a40724949 (diff)
downloadchouette-core-9b83abfc89b9b1bb1d55f8728ecf7d59ac971b99.tar.bz2
fix review for pull request
Diffstat (limited to 'app')
-rw-r--r--app/controllers/compliance_check_sets_controller.rb13
-rw-r--r--app/views/compliance_check_sets/index.html.slim8
2 files changed, 9 insertions, 12 deletions
diff --git a/app/controllers/compliance_check_sets_controller.rb b/app/controllers/compliance_check_sets_controller.rb
index 989db1aeb..7d964731d 100644
--- a/app/controllers/compliance_check_sets_controller.rb
+++ b/app/controllers/compliance_check_sets_controller.rb
@@ -10,17 +10,14 @@ class ComplianceCheckSetsController < BreadcrumbController
scope = ransack_period @compliance_check_sets
@q_for_form = scope.ransack(params[:q])
format.html {
- @compliance_check_sets = decorate_compliance_check_sets(@q_for_form.result)
+ @compliance_check_sets = ModelDecorator.decorate(
+ @q_for_form.result,
+ with: ComplianceCheckSetDecorator
+ )
}
end
end
- def decorate_compliance_check_sets(compliance_check_sets)
- ModelDecorator.decorate(
- compliance_check_sets,
- with: ComplianceCheckSetDecorator
- )
- end
private
@@ -44,7 +41,7 @@ class ComplianceCheckSetsController < BreadcrumbController
return scope unless !!@begin_range && !!@end_range
if @begin_range > @end_range
- flash.now[:error] = t('imports.filters.error_period_filter')
+ flash.now[:error] = t('compliance_check_sets.filters.error_period_filter')
else
scope = scope.where_created_at_between(@begin_range, @end_range)
end
diff --git a/app/views/compliance_check_sets/index.html.slim b/app/views/compliance_check_sets/index.html.slim
index e33905fce..3e9b05393 100644
--- a/app/views/compliance_check_sets/index.html.slim
+++ b/app/views/compliance_check_sets/index.html.slim
@@ -18,7 +18,7 @@
.col-lg-12
.select_table
= table_builder_2 @compliance_check_sets,
- [ \
+ [ \
TableBuilderHelper::Column.new( \
key: :ref, \
attribute: 'referential_id' \
@@ -43,9 +43,9 @@
attribute: Proc.new{ |n| (n.compliance_control_set.name) if n.compliance_control_set} \
), \
],
- sortable: true,
- links: [:show],
- cls: 'table has-filter has-search'
+ sortable: true,
+ links: [:show],
+ cls: 'table has-filter has-search'
- unless @compliance_check_sets.any?
.row.mt-xs
.col-lg-12