Class: Rails::Couchbase::Railtie
- Defined in:
- lib/couchbase/railtie.rb
Overview
:nodoc:
Class Method Summary collapse
-
.generator ⇒ Symbol
Determine which generator to use.
-
.rescue_responses ⇒ Hash
Maping of rescued exceptions to HTTP responses.
Class Method Details
.generator ⇒ Symbol
Determine which generator to use. app_generators was introduced after 3.0.0.
38 39 40 |
# File 'lib/couchbase/railtie.rb', line 38 def self.generator config.respond_to?(:app_generators) ? :app_generators : :generators end |
.rescue_responses ⇒ Hash
Maping of rescued exceptions to HTTP responses
50 51 52 53 54 55 56 |
# File 'lib/couchbase/railtie.rb', line 50 def self.rescue_responses { 'Couchbase::Error::NotFound' => :not_found, 'Couchbase::Error::NotStored' => :unprocessable_entity, 'Couchbase::Error::RecordInvalid' => :unprocessable_entity } end |