Skip to content

Commit 51b8116

Browse files
committed
fix linter
1 parent 1b8af7e commit 51b8116

File tree

6 files changed

+8
-16
lines changed

6 files changed

+8
-16
lines changed

app/admin/components/dialog.rb

+1-3
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,7 @@ def add_child(child)
2626
end
2727
end
2828

29-
def children?
30-
@inner_content.children?
31-
end
29+
delegate :children?, to: :@inner_content
3230
end
3331
end
3432
end

app/models/operator_document_filter_tree.rb

+2-2
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,6 @@ def tree
1616
}
1717
end
1818

19-
private
20-
2119
TYPES = [
2220
{id: "OperatorDocumentCountry", name: I18n.t("operator_documents.filters.producer")},
2321
{id: "OperatorDocumentFmu", name: I18n.t("operator_documents.filters.fmu")}
@@ -36,6 +34,8 @@ def tree
3634
{id: 3, name: I18n.t("filters.other")}
3735
].freeze
3836

37+
private
38+
3939
def legal_categories
4040
RequiredOperatorDocumentGroup.with_translations.where.not(id: required_operator_group_id_to_exclude).map do |x|
4141
{

app/resources/v1/operator_document_country_resource.rb

+1-3
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,6 @@ def self.creatable_fields(context)
1616
super - [:fmu_id]
1717
end
1818

19-
def type
20-
@model.type
21-
end
19+
delegate :type, to: :@model
2220
end
2321
end

app/resources/v1/operator_document_fmu_resource.rb

+1-3
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@ module V1
44
class OperatorDocumentFmuResource < OperatorDocumentResource
55
has_one :required_operator_document_fmu
66

7-
def type
8-
@model.type
9-
end
7+
delegate :type, to: :@model
108
end
119
end

app/resources/v1/operator_resource.rb

+1-3
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,7 @@ class OperatorResource < BaseResource
2929
before_create :set_active
3030
after_create :send_notification
3131

32-
def type
33-
@model.type
34-
end
32+
delegate :type, to: :@model
3533

3634
def set_active
3735
@model.is_active = false

lib/active_admin/filter_saver/controller.rb

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@ module FilterSaver
88
# @author David Daniell / тιηуηυмвєяѕ <[email protected]>
99
# rubocop:enable Style/AsciiComments
1010
module Controller
11-
private
12-
1311
SAVED_FILTER_KEY = :last_search_filter
1412

13+
private
14+
1515
def restore_search_filters
1616
filter_storage = session[SAVED_FILTER_KEY]
1717
if params[:clear_filters].present?

0 commit comments

Comments
 (0)