Class: PoolingsController
- Inherits:
- 
      ApplicationController
      
        - Object
- ActionController::Base
- ApplicationController
- PoolingsController
 
- Defined in:
- app/controllers/poolings_controller.rb
Overview
ALlows the creation of a new MultiplexedLibraryTube from one or more arbitrary tubes
Constant Summary
Constants included from FlashTruncation
FlashTruncation::STRING_OVERHEAD
Instance Method Summary collapse
- 
  
    
      #create  ⇒ Object 
    
    
  
  
  
  
  
  
  
  
  
    rubocop:todo Metrics/AbcSize. 
- #new ⇒ Object
- #pooling_params ⇒ Object
Methods inherited from ApplicationController
#block_api_access, #evil_parameter_hack!, #extract_header_info, #set_cache_disabled!
Methods included from FlashTruncation
#max_flash_size, #truncate_flash, #truncate_flash_array
Instance Method Details
#create ⇒ Object
rubocop:todo Metrics/AbcSize
| 9 10 11 12 13 14 15 16 17 18 19 | # File 'app/controllers/poolings_controller.rb', line 9 def create # rubocop:todo Metrics/AbcSize @pooling = Pooling.new(pooling_params.merge(barcode_printer: params[:printer])) if @pooling.valid? @pooling.execute flash.update(@pooling.) redirect_to new_pooling_path else flash.now[:error] = @pooling.errors. render :new end end | 
#new ⇒ Object
| 5 6 7 | # File 'app/controllers/poolings_controller.rb', line 5 def new @pooling = Pooling.new(pooling_params) end | 
#pooling_params ⇒ Object
| 21 22 23 24 25 | # File 'app/controllers/poolings_controller.rb', line 21 def pooling_params if params[:pooling].present? params.require(:pooling).permit(:stock_mx_tube_required, :count, :barcode_printer, barcodes: []) end end |