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 create_collection_from_item
    @collection.add(@item)
    EOL::GlobalStatistics.increment('collections')
    flash[:notice] = I18n.t(:collection_created_notice, collection_name: link_to_name(@collection))
    respond_to do |format|
      format.html { redirect_to link_to_item(@item), status: :moved_permanently }
      format.js do
        convert_flash_messages_for_ajax
        render partial: 'shared/flash_messages', layout: false
      end
    end
  end
def create_collection_from_item @collection . add ( @item ) EOL :: GlobalStatistics . increment ( 'collections' ) flash [ :notice ] = I18n . t ( :collection_created_notice , collection_name : link_to_name ( @collection ) ) respond_to do | format | format . html { redirect_to link_to_item ( @item ) , status : :moved_permanently } format . js do convert_flash_messages_for_ajax render partial : 'shared/flash_messages' , layout : false end end end
TODO - review these.
TODO - review these .