app/controllers/collections_controller.rb
# TODO - review these. There are too many and as a result there's some redundancy in, for example, checking whether the user is logged in on unpublished
# collections
review these. There are too many and as a result there's some redundancy in, for example, checking whether the user is logged in on unpublished
collections
review these . There are too many and as a result there ' s some redundancy in for example checking whether the user is logged in on unpublished collections
def chosen
    case params[:for]
    when 'move'
      return copy_items_and_redirect(@collection, @collections, move: true)
    when 'copy'
      return copy_items_and_redirect(@collection, @collections)
    else
      if params[:action] == "update"
        return annotate
      else
        flash[:error] = I18n.t(:action_not_available_error)
        return redirect_to collection_path(@collection)
      end
    end
  end
def chosen case params [ :for ] when 'move' return copy_items_and_redirect ( @collection , @collections , move : true ) when 'copy' return copy_items_and_redirect ( @collection , @collections ) else if params [ :action ] == "update" return annotate else flash [ :error ] = I18n . t ( :action_not_available_error ) return redirect_to collection_path ( @collection ) end end end
TODO - review these.
TODO - review these .
# call for annotate