You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ActiveModel::Errors no longer subclasses OrderedHash as of 3.1:
hhttps://github.com/rails/rails/commit/307e6b2b74ba3ae72602dc33e6d45cd3e46181c7#activemodel/lib/active_model/errors.rb
Thus #each_pair is no longer implemented and CouchPotato::Database#valid_document? raises a NoMethodError.
I'll investigate a fix when I get a chance but wanted to go ahead and raise the flag.
The text was updated successfully, but these errors were encountered:
This may be a change in 3.1.rc5, but save_document appears to hang when there are validation errors on a document.
class ThingA
include CouchPotato::Persistence
property :title
validates :title, :presence => true
end
CouchPotato.database.save_document(ThingA.new)
puts "This is never printed."
/Users/matt/dev/crankapps/.bundled/ruby/1.9.1/bundler/gems/couch_potato-0d7bf6efa7a8/lib/couch_potato/database.rb:174
v.each {|message| document.errors.add(k, message)}
(rdb:1) p v
["can't be blank", "can't be blank", "can't be blank"]
(rdb:1) n
/Users/matt/dev/crankapps/.bundled/ruby/1.9.1/bundler/gems/couch_potato-0d7bf6efa7a8/lib/couch_potato/database.rb:174
v.each {|message| document.errors.add(k, message)}
(rdb:1) p v
["can't be blank", "can't be blank", "can't be blank", "can't be blank"]
(rdb:1)
ActiveModel::Errors no longer subclasses OrderedHash as of 3.1:
hhttps://github.com/rails/rails/commit/307e6b2b74ba3ae72602dc33e6d45cd3e46181c7#activemodel/lib/active_model/errors.rb
Thus #each_pair is no longer implemented and CouchPotato::Database#valid_document? raises a NoMethodError.
I'll investigate a fix when I get a chance but wanted to go ahead and raise the flag.
The text was updated successfully, but these errors were encountered: