Skip to content

Commit

Permalink
Fix: #301 カスタム絵文字編集時、カテゴリ選択の初期値の異常 (#306)
Browse files Browse the repository at this point in the history
  • Loading branch information
kmycode committed Nov 28, 2023
1 parent d874070 commit 795d2c7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/views/admin/custom_emojis/edit.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
%h4= t('admin.custom_emojis.edit.label')

.fields-group
= f.select :category_id, options_from_collection_for_select(CustomEmojiCategory.all, 'id', 'name'), prompt: t('admin.custom_emojis.assign_category'), class: 'select optional', 'aria-label': t('admin.custom_emojis.assign_category')
= f.input :category_id, collection: CustomEmojiCategory.all, label_method: ->(item) { item.name }, collection_wrapper_tag: 'ul', item_wrapper_tag: 'li', include_blank: t('admin.custom_emojis.assign_category'), wrapper: :with_label, label: false, hint: false

.fields-group
= f.input :visible_in_picker, as: :boolean, wrapper: :with_label, label: t('admin.custom_emojis.visible_in_picker')
Expand Down
2 changes: 1 addition & 1 deletion app/views/admin/custom_emojis/new.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
= f.input :image, wrapper: :with_label, input_html: { accept: CustomEmoji::IMAGE_MIME_TYPES.join(' ') }, hint: t('admin.custom_emojis.image_hint', size: number_to_human_size(CustomEmoji::LIMIT))

.fields-group
= f.select :category_id, options_from_collection_for_select(CustomEmojiCategory.all, 'id', 'name'), prompt: t('admin.custom_emojis.assign_category'), class: 'select optional', 'aria-label': t('admin.custom_emojis.assign_category')
= f.input :category_id, collection: CustomEmojiCategory.all, label_method: ->(item) { item.name }, collection_wrapper_tag: 'ul', item_wrapper_tag: 'li', include_blank: t('admin.custom_emojis.assign_category'), wrapper: :with_label, label: false, hint: false

.fields-group
= f.input :visible_in_picker, as: :boolean, wrapper: :with_label, label: t('admin.custom_emojis.visible_in_picker')
Expand Down

0 comments on commit 795d2c7

Please sign in to comment.