Skip to content

Commit b3ccb85

Browse files
authored
Merge pull request #3436 from manyfold3d/fix-print-flag
Fix display of "printed" state
2 parents 413d2e4 + bdcf2de commit b3ccb85

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

app/helpers/application_helper.rb

+4-1
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,10 @@ def checkbox_input_row(form, name, options = {})
132132
form.label(name, class: "col-sm-2 col-form-label"),
133133
content_tag(:div, class: "col-sm-10") do
134134
content_tag(:div, class: "form-switch") do
135-
form.check_box name, class: "form-check-input form-check-inline"
135+
safe_join [
136+
form.check_box(name, options.merge(class: "form-check-input form-check-inline")),
137+
errors_for(form.object, name)
138+
].compact
136139
end
137140
end
138141
]

app/models/user.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ def self.find_param(param)
5353
end
5454

5555
def printed?(file)
56-
listed?(file, scope: :printed)
56+
listed?(file, :printed)
5757
end
5858

5959
def self.ransackable_attributes(auth_object = nil)

0 commit comments

Comments
 (0)