Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
Rails:ユーザーがアップロードした画像をプロファイルに表示する前に承認する必要がある管理者承認機能を追加するにはどうすればよいですか?
ユーザーのアバターに、admin_approvedまたは同様のことを言う列を追加するのはどうですか? ActiveAdmin を使用しているため、列を取得する必要があります (特に指定しない限り)。次に、画像を表示する前にチェックを追加します。
admin_approved
<%= user_images.each do |image| %> <% if image.admin_approved %> <%= image_tag image.url %> <% end %> <% end %>