Skip to content

Commit

Permalink
others_editor_checked?メソッドの引数userを削除
Browse files Browse the repository at this point in the history
  • Loading branch information
88-99 committed Feb 28, 2024
1 parent 54232a2 commit 31014e3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions app/decorators/user_decorator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ def hibernation_days
ActiveSupport::Duration.build(Time.zone.now - hibernated_at).in_days.floor if hibernated_at?
end

def others_editor_checked?(user, editors)
user.editor.present? && editors.exclude?(user.editor)
def others_editor_checked?(editors)
editor.present? && editors.exclude?(editor)
end
end
2 changes: 1 addition & 1 deletion app/views/users/form/_editor.html.slim
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
= f.radio_button :editor, editor, id: editor, class: 'a-toggle-checkbox'
= f.label :editor, for: editor, class: 'a-block-check__label has-icon is-ta-left' do
= editor
- others_editor_checked = user.others_editor_checked?(user, editors)
- others_editor_checked = user.others_editor_checked?(editors)
li.block-checks__item
.a-block-check.is-radio
= f.radio_button :editor, 'others_editor', id: 'others_editor', class: 'a-toggle-checkbox', checked: others_editor_checked
Expand Down

0 comments on commit 31014e3

Please sign in to comment.