Skip to content

Commit

Permalink
エディタ登録前はnilを返すよう修正
Browse files Browse the repository at this point in the history
enum editorのハッシュがそのまま表示されてしまうため
  • Loading branch information
88-99 committed Mar 30, 2024
1 parent fe39a3b commit e7d3863
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions app/decorators/user_decorator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,8 @@ def other_editor_checked?(editors)
end

def editor_or_other_editor
return nil if editor.nil?

editor == 'other_editor' ? other_editor : t("activerecord.enums.user.editor.#{editor}")
end
end

0 comments on commit e7d3863

Please sign in to comment.