merb_datamapper 1.0.8 → 1.0.8.1
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/merb_datamapper.rb +18 -0
- metadata +3 -3
data/lib/merb_datamapper.rb
CHANGED
@@ -68,4 +68,22 @@ if defined?(Merb::Plugins)
|
|
68
68
|
Merb.add_generators generators / 'data_mapper_model'
|
69
69
|
Merb.add_generators generators / 'data_mapper_resource_controller'
|
70
70
|
Merb.add_generators generators / 'data_mapper_migration'
|
71
|
+
|
72
|
+
# Override bug in DM::Timestamps
|
73
|
+
Merb::BootLoader.after_app_loads do
|
74
|
+
module DataMapper
|
75
|
+
module Timestamp
|
76
|
+
private
|
77
|
+
|
78
|
+
def set_timestamps
|
79
|
+
return unless dirty? || new_record?
|
80
|
+
TIMESTAMP_PROPERTIES.each do |name,(_type,proc)|
|
81
|
+
if model.properties.has_property?(name)
|
82
|
+
model.properties[name].set(self, proc.call(self, model.properties[name])) unless attribute_dirty?(name)
|
83
|
+
end
|
84
|
+
end
|
85
|
+
end
|
86
|
+
end
|
87
|
+
end
|
88
|
+
end
|
71
89
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: merb_datamapper
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.8
|
4
|
+
version: 1.0.8.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jason Toy
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2009-01-
|
12
|
+
date: 2009-01-19 00:00:00 -07:00
|
13
13
|
default_executable:
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
@@ -40,7 +40,7 @@ dependencies:
|
|
40
40
|
requirements:
|
41
41
|
- - ~>
|
42
42
|
- !ruby/object:Gem::Version
|
43
|
-
version: 1.0.8
|
43
|
+
version: 1.0.8.1
|
44
44
|
version:
|
45
45
|
description: DataMapper plugin providing DataMapper support for Merb
|
46
46
|
email: jtoy@rubynow.com
|