app/controllers/collections_controller.rb
# NOTE - I COULD check the collection size against Collection::REINDEX_LIMIT, but I'd actually like to (personally) be able to
# call the URL on large collections. Soooo... for me, it's enough that the link doesn't show up. That'll keep people from using
# it unless they want to "force" it by faking the URL (which is, admittedly, easy, but I think that's fair).
I COULD check the collection size against Collection::REINDEX_LIMIT, but I'd actually like to (personally) be able to
call the URL on large collections.
I COULD check the collection size against Collection :: REINDEX_LIMIT but I ' d actually like to ( personally ) be able to call the URL on large collections .
def reindex
    collection = Collection.find(params[:id])
    EOL::Solr::CollectionItemsCoreRebuilder.reindex_collection(collection)
    collection.update_attribute(:collection_items_count,
      collection.collection_items.count)
    redirect_to collection, notice: I18n.t(:collection_redindexed)
  end
def reindex collection = Collection . find ( params [ :id ] ) EOL :: Solr :: CollectionItemsCoreRebuilder . reindex_collection ( collection ) collection . update_attribute ( :collection_items_count , collection . collection_items . count ) redirect_to collection , notice : I18n . t ( :collection_redindexed ) end
NOTE - I COULD check the collection size against Collection::REINDEX_LIMIT, but I'd actually like to (personally) be able to
call the URL on large collections.
NOTE - I COULD check the collection size against Collection :: REINDEX_LIMIT but I ' d actually like to ( personally ) be able to call the URL on large collections .