now using ActiveModel::Dirty. only writes to database if model.changed?
This commit is contained in:
parent
53b052f631
commit
4dbf694e51
14 changed files with 342 additions and 18 deletions
|
@ -16,6 +16,7 @@ module CouchRest
|
|||
include CouchRest::Model::PropertyProtection
|
||||
include CouchRest::Model::Associations
|
||||
include CouchRest::Model::Validations
|
||||
include CouchRest::Model::Dirty
|
||||
|
||||
def self.subclasses
|
||||
@subclasses ||= []
|
||||
|
@ -55,7 +56,7 @@ module CouchRest
|
|||
after_initialize if respond_to?(:after_initialize)
|
||||
end
|
||||
|
||||
|
||||
|
||||
# Temp solution to make the view_by methods available
|
||||
def self.method_missing(m, *args, &block)
|
||||
if has_view?(m)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue