DataMapper create not working
I have a model like:
class Person include DataMapper::Resource property :id, Serial property
:name, String end
Person.finalize Person.auto_migrate!
now if I do person = Person.create(name: "Jack")
There are no new entries in the table.
But the following works person = Person.new person.save This gives me one
new record.
Why this strange behaviour?
No comments:
Post a Comment