forked from sxross/MotionModel
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CHANGELOG
106 lines (73 loc) · 4.36 KB
/
CHANGELOG
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
2013-05-21: Added different method of converting from String to date using
iOS DataDetector instead of dateFromNaturalLanguageString.
2013-04-13: WARNING: Possible breaking change. Hook methods changed to send
affected object. So, if you have:
def after_create
You will get an error about expecting 1 argument, got 0
The correct signature is:
def after_create(sender)
2013-03-15: Fixed bug where created_at and updated_at were being incorrectly
when restored from persistence (thanks Justin McPherson for finding
that).
Moved all NSCoder stuff out of Model to ArrayModelAdapter.
2013-02-19: Included Doug Puchalski's great refactoring of Model that provides an
adapter for ArrayModelAdapter. WARNING!!! This is a breaking change
since version 0.3.8. You will have to include:
MotionModel::ArrayModelAdapter
after including MotionModel::Model to get the same functionality.
Failure to include an adapter (note: spelling counts :) will result
in an exception so this will not quietly fail.
2013-01-24: Added block-structured transactions.
2013-01-14: Fixed problem where data returned from forms was of type NSString, which
confused some monkey-patching code.
Changed before_ hooks such that handlers returning false would terminate
the process. So, if before_save returns anything other than false, the
save continues. Only if before_save returns false does the save get
interrupted.
Fixed immutable string issue in validations.
2013-01-09: Added automatic date/timestamp support for created_at and updated_at columns
Added Hash extension except, Array introspection methods has_hash_key? and
has_hash_value?
Commit of Formotion module including optional inclusion/suppression of the
auto-date fields
Specs
2012-12-30: Added Formotion module. This allows for tighter integration with Formotion
Changed options for columns such that any arbitrary values can be inserted
allowing for future expansion.
2012-12-14: Added lots of framework to validations
Added validations for length, format, email, presence
Added array type (thanks justinmcp)
2012-12-07: Added MIT license file.
InputHelpers: Whitespace cleanup. Fixed keyboard show/hide to scroll to correct position.
MotionModel::Column: Whitespace cleanup, added code to support cascading delete (:dependent => :destroy)
MotionModel::Model: Whitespace cleanup, added code to support cascading destroy, destroy_all, and cascading if specified.
relation_spec.rb: removed delete tests into cascading_delete_spec.rb
2012-12-06: Work on has_many to add cascading delete
MotionModel: POTENTIAL CODE-BREAKING CHANGE. has_many now takes two arguments
only. Previously, it would allow a list of symbols or strings,
now it conforms more to the Rails way of one call per relation.
E.g.:
has_many :pets
-or-
has_many :pets, :delete => :destroy # cascade delete.
2012-10-14: Primary New Feature: Notifications
MotionModel: Added bulk update, which suppresses notifications and added it to delete_all.
MotionModel: Added notifications of type MotionModelDataDidChangeNotification on data change.
MotionModel: Added classification code to save to differentiate between save-new and update
MotionModel: Added notification calls to save and delete
2012-09-05: Basically rewrote how the data is stored.
The API remains consistent, but a certain amount of
efficiency is added by adding hashes to map column names
to the column metadata.
* Type casting now works, and is a function of initialization
and of assignment.
* Default values have been added to fill in values
if not specified in new or create.
2012-09-06: Added block-style finders. Added delete method.
2012-09-07: IMPORTANT! PLEASE READ! Two new methods were added
to MotionModel to support persistence:
Task#serialize_to_file(file_name)
Task.deserialize_from_file(file_name)
Note that serialize operates on an instance and
deserialize is a class method that creates an
instance.