Sha256: 8e621fbfcb8ec595d7586ccbb0d7d52d66dc6cfc237caf750c28e37cc4ec09be

Contents?: true

Size: 596 Bytes

Versions: 22

Compression:

Stored size: 596 Bytes

Contents

class Admin::Taxons::CreateController < Admin::BaseController
  def create
    if _taxon_creation_success?
      _taxon_factory.save!
      render json: _taxon_hash
    else
      render json: _error_hash, status: :expectation_failed
    end
  end
  private
  def _taxon_creation_success?
    _taxon_factory.satisfy_specifications?
  end
  def _taxon_hash
    _taxon_factory.taxon_hash
  end
  def _error_hash
    _taxon_factory.error_hash
  end
  def _taxon_factory
    @taxon_factory ||= Admin::TaxonFactory.new _taxon_params
  end
  def _taxon_params
    params.require(:admin_taxon)
  end
end

Version data entries

22 entries across 22 versions & 1 rubygems

Version Path
cloudrider-0.3.23 generica/app/controllers/admin/taxons/create_controller.rb
cloudrider-0.3.22 generica/app/controllers/admin/taxons/create_controller.rb
cloudrider-0.3.21 generica/app/controllers/admin/taxons/create_controller.rb
cloudrider-0.3.20 generica/app/controllers/admin/taxons/create_controller.rb
cloudrider-0.3.0 generica/app/controllers/admin/taxons/create_controller.rb
cloudrider-0.2.18 generica/app/controllers/admin/taxons/create_controller.rb
cloudrider-0.2.15 generica/app/controllers/admin/taxons/create_controller.rb
cloudrider-0.2.14 generica/app/controllers/admin/taxons/create_controller.rb
cloudrider-0.2.12 generica/app/controllers/admin/taxons/create_controller.rb
cloudrider-0.2.11 generica/app/controllers/admin/taxons/create_controller.rb
cloudrider-0.2.10 generica/app/controllers/admin/taxons/create_controller.rb
cloudrider-0.2.9 generica/app/controllers/admin/taxons/create_controller.rb
cloudrider-0.2.8 generica/app/controllers/admin/taxons/create_controller.rb
cloudrider-0.2.7 generica/app/controllers/admin/taxons/create_controller.rb
cloudrider-0.2.6 generica/app/controllers/admin/taxons/create_controller.rb
cloudrider-0.2.5 generica/app/controllers/admin/taxons/create_controller.rb
cloudrider-0.2.4 generica/app/controllers/admin/taxons/create_controller.rb
cloudrider-0.2.3 generica/app/controllers/admin/taxons/create_controller.rb
cloudrider-0.2.2 generica/app/controllers/admin/taxons/create_controller.rb
cloudrider-0.2.1 generica/app/controllers/admin/taxons/create_controller.rb