Changing model_type_key one last time to 'type'. General doc refinements for 1.1.0.beta5 release

This commit is contained in:
Sam Lown 2011-04-30 13:13:38 +02:00
parent da3e524020
commit e8e1722241
7 changed files with 55 additions and 28 deletions

View file

@ -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

View file

@ -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