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