Setting default model type name to 'model'
This commit is contained in:
parent
3764d1cd5c
commit
bc4c8719d0
7 changed files with 25 additions and 9 deletions
|
@ -13,7 +13,7 @@ module CouchRest
|
|||
add_config :auto_update_design_doc
|
||||
|
||||
configure do |config|
|
||||
config.model_type_key = 'couchrest-type' # 'model'?
|
||||
config.model_type_key = 'model' # was 'couchrest-type'
|
||||
config.mass_assign_any_attribute = false
|
||||
config.auto_update_design_doc = true
|
||||
end
|
||||
|
|
|
@ -116,6 +116,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
|
||||
opts = { }
|
||||
type = options.shift
|
||||
if type.class != Hash
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue