%h2= @image.title

= image_tag @image.image_file

%p
  = label_tag 'image-url', t('images.image_address')
  = text_field_tag 'image-url', request.original_url, readonly: 'readonly', class: 'copy-image-url-link', onclick: 'select()'

%p
  = link_to t('common.back'), images_path
  - if permitted_to? :edit, @image
    = link_to t('crud.edit'), edit_image_path
  - if permitted_to? :destroy || @image.uploader == @current_user, @image
    = link_to t('crud.destroy'), @image, confirm: t('crud.confirm'), method: :delete

%h2= t('images.tags')
- if @image.tags.any?
  - @image.tags.each do |tag|
    = link_to tag.name, search_images_path({ search: tag.name })
- else
  %p= t('images.no_tags')

%p
  = t('images.uploaded_at', time: @image.image_file_updated_at)
  = t('images.uploaded_by', name: @image.uploader.full_name)

%h2= @image.title

= image_tag @image.image_file

%p
  = label_tag 'image-url', t('images.image_address')
  = text_field_tag 'image-url', request.original_url, readonly: 'readonly', class: 'copy-image-url-link', onclick: 'select()'

%p
  = link_to t('common.back'), images_path
  - if permitted_to? :edit, @image
    = link_to t('crud.edit'), edit_image_path
  - if permitted_to? :destroy || @image.uploader == @current_user, @image
    = link_to t('crud.destroy'), @image, confirm: t('crud.confirm'), method: :delete

%h2= t('images.tags')
- if @image.tags.any?
  - @image.tags.each do |tag|
    = link_to tag.name, search_images_path({ search: tag.name })
- else
  %p= t('images.no_tags')

%p
  - if @image.uploader.nil?
    = t('images.uploaded_at', time: @image.image_file_updated_at)
  - else
    = t('images.uploaded_at', time: @image.image_file_updated_at)
    = t('images.uploaded_by', name: @image.uploader.full_name)

Fix to handle uploader being nil object
Fix to handle uploader being nil object
