I'm just starting to use couchrest_model -- and it was working -- and I feel like I must be doing something obvious and stupid
...
but ... now I can't add properties to couchrest_model models anymore ???
Obviously this is problem for my whole app but here's a very simple test case.
I have the following class:
class Md2dModel < CouchRest::Model::Base
end
In rails console I enter:
m1 = Md2dModel.new("a" => 123)
>> #<Md2dModel type: "Md2dModel">
But the property isn't added:
m1.to_json
>> "{\"type\":\"Md2dModel\"}"
If instead if I add the property directly to the model instance it works:
m1["a"] = 123
>> 123
m1.to_json
>> "{\"type\":\"Md2dModel\",\"a\":123}"
What could be going wrong??
I'm working in rails 3.2.3.
Am using my fork of couchrest 1.1.2 which just extends the gem dependency specification for the multi_json gem
gem "couchrest", :git => "git://
github.com/concord-consortium/couchrest.git", :branch => "works-with-rails3.2"
gem "couchrest_model", '~> 1.1'