app/controllers/classifications_controller.rb
# Sorry, another beast of a method that handles many different things... because there's necessarily only one form.
Sorry, another beast of a method that handles many different things... because there's necessarily only one form.
Sorry another beast of a method that handles many different things ... because there ' s necessarily only one form .
def create
    @debug = false
    debug '#create'
    @taxon_concept = TaxonConcept.find(params[:taxon_concept_id])
    @target_params = {all: 1} 
    master = current_user.min_curator_level?(:master)
    if master && params[:split]
      split
    elsif master && params[:merge]
      merge
    elsif master && params[:cancel_split]
      cancel_split
    elsif master && params[:add]
      add
    elsif master && which = params_to_remove
      remove(which)
    elsif master && which = params_exemplar
      exemplar(params[:confirm], which)
    elsif current_user.min_curator_level?(:full) && params[:hierarchy_entry_id]
      prefer
    end
    respond_to do |format|
      format.html do
        redirect_to taxon_names_path(@taxon_concept, @target_params)
      end
    end
  end
def create @debug = false debug '#create' @taxon_concept = TaxonConcept . find ( params [ :taxon_concept_id ] ) @target_params = { all : 1 } master = current_user . min_curator_level? ( :master ) if master && params [ :split ] split elsif master && params [ :merge ] merge elsif master && params [ :cancel_split ] cancel_split elsif master && params [ :add ] add elsif master && which = params_to_remove remove ( which ) elsif master && which = params_exemplar exemplar ( params [ :confirm ] , which ) elsif current_user . min_curator_level? ( :full ) && params [ :hierarchy_entry_id ] prefer end respond_to do | format | format . html do redirect_to taxon_names_path ( @taxon_concept , @target_params ) end end end
Sorry, another beast of a method that handles many different things... because there's necessarily only one form.
Sorry another beast of a method that handles many different things ... because there ' s necessarily only one form .
# Show all classifications after any operation that comes here.