Changing model_type_key one last time to 'type'. General doc refinements for 1.1.0.beta5 release
This commit is contained in:
parent
da3e524020
commit
e8e1722241
7 changed files with 55 additions and 28 deletions
|
@ -16,7 +16,7 @@ module CouchRest
|
|||
add_config :connection_config_file
|
||||
|
||||
configure do |config|
|
||||
config.model_type_key = 'model' # was 'couchrest-type'
|
||||
config.model_type_key = 'type' # was 'couchrest-type'
|
||||
config.mass_assign_any_attribute = false
|
||||
config.auto_update_design_doc = true
|
||||
|
||||
|
|
|
@ -140,7 +140,7 @@ module CouchRest
|
|||
module ClassMethods
|
||||
|
||||
def property(name, *options, &block)
|
||||
raise "Invalid property definition, '#{name}' already used for CouchRest Model type field" if name.to_s == model_type_key.to_s
|
||||
raise "Invalid property definition, '#{name}' already used for CouchRest Model type field" if name.to_s == model_type_key.to_s && CouchRest::Model::Base >= self
|
||||
opts = { }
|
||||
type = options.shift
|
||||
if type.class != Hash
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue