Module: CouchRest
- Defined in:
- lib/couchrest/casted_array.rb,
lib/couchrest/property.rb,
lib/couchrest/validation.rb,
lib/couchrest/casted_model.rb,
lib/couchrest/mixins/views.rb,
lib/couchrest/mixins/typecast.rb,
lib/couchrest/mixins/callbacks.rb,
lib/couchrest/extended_document.rb,
lib/couchrest/mixins/attributes.rb,
lib/couchrest/mixins/collection.rb,
lib/couchrest/mixins/design_doc.rb,
lib/couchrest/mixins/properties.rb,
lib/couchrest/support/couchrest.rb,
lib/couchrest/mixins/class_proxy.rb,
lib/couchrest/mixins/document_queries.rb,
lib/couchrest/validation/auto_validate.rb,
lib/couchrest/mixins/attribute_protection.rb,
lib/couchrest/mixins/extended_attachments.rb,
lib/couchrest/validation/validation_errors.rb,
lib/couchrest/validation/contextual_validators.rb,
lib/couchrest/validation/validators/formats/url.rb,
lib/couchrest/validation/validators/formats/email.rb,
lib/couchrest/validation/validators/format_validator.rb,
lib/couchrest/validation/validators/length_validator.rb,
lib/couchrest/validation/validators/method_validator.rb,
lib/couchrest/validation/validators/generic_validator.rb,
lib/couchrest/validation/validators/numeric_validator.rb,
lib/couchrest/validation/validators/absent_field_validator.rb,
lib/couchrest/validation/validators/confirmation_validator.rb,
lib/couchrest/validation/validators/required_field_validator.rb
Overview
Extracted from dm-validations 0.9.10
Copyright © 2007 Guy van den Berg
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Defined Under Namespace
Modules: CastedModel, Mixins, Validation Classes: CastedArray, Database, ExtendedDocument, Property
Constant Summary collapse
- DEFAULT_DESIGN_NAME_FUN =
The default design document name generator is simple, but you can override it by setting CouchRest.design_name_fun
lambda { |klass| klass.to_s }
- DEFAULT_TYPE_FIELD =
The default type field, which can be chanegd by setting CouchRest.type_field
'couchrest-type'
- @@design_name_fun =
DEFAULT_DESIGN_NAME_FUN
- @@type_field =
DEFAULT_TYPE_FIELD
Class Method Summary collapse
-
.design_name_fun ⇒ Object
Get current design document name generator Proc.
-
.design_name_fun=(fun) ⇒ Object
Set the design name generator Proc.
-
.type_field ⇒ Object
Get the current type field name.
-
.type_field=(type_field) ⇒ Object
Set the type field name.
Class Method Details
.design_name_fun ⇒ Object
Get current design document name generator Proc
16 17 18 |
# File 'lib/couchrest/mixins/design_doc.rb', line 16 def self.design_name_fun @@design_name_fun end |
.design_name_fun=(fun) ⇒ Object
Set the design name generator Proc
21 22 23 |
# File 'lib/couchrest/mixins/design_doc.rb', line 21 def self.design_name_fun= fun @@design_name_fun = fun end |
.type_field ⇒ Object
Get the current type field name
26 27 28 |
# File 'lib/couchrest/mixins/design_doc.rb', line 26 def self.type_field @@type_field end |
.type_field=(type_field) ⇒ Object
Set the type field name
31 32 33 |
# File 'lib/couchrest/mixins/design_doc.rb', line 31 def self.type_field= type_field @@type_field = type_field end |