Adding support for proxying and more refinements to views
This commit is contained in:
parent
63bb1bb6bd
commit
a78e3b74d6
14 changed files with 560 additions and 46 deletions
|
@ -93,12 +93,12 @@ module CouchRest
|
|||
|
||||
# Creates a new instance, bypassing attribute protection
|
||||
#
|
||||
#
|
||||
# ==== Returns
|
||||
# a document instance
|
||||
def create_from_database(doc = {})
|
||||
#
|
||||
def build_from_database(doc = {})
|
||||
base = (doc[model_type_key].blank? || doc[model_type_key] == self.to_s) ? self : doc[model_type_key].constantize
|
||||
base.new(doc, :directly_set_attributes => true)
|
||||
base.new(doc, :directly_set_attributes => true)
|
||||
end
|
||||
|
||||
# Defines an instance and save it directly to the database
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue