File tree Expand file tree Collapse file tree 1 file changed +18
-2
lines changed Expand file tree Collapse file tree 1 file changed +18
-2
lines changed Original file line number Diff line number Diff line change @@ -24,7 +24,7 @@ def initialize(model, options={})
24
24
)
25
25
end
26
26
end
27
-
27
+
28
28
def earliest
29
29
model . find ( :first ,
30
30
:order => "#{ timestamp_field } asc" ) . send ( timestamp_field )
@@ -65,6 +65,22 @@ def deleted?(record)
65
65
false
66
66
end
67
67
68
+ def respond_to? ( m , *args )
69
+ if m =~ /^map_/
70
+ model . respond_to? ( m , *args )
71
+ else
72
+ super
73
+ end
74
+ end
75
+
76
+ def method_missing ( m , *args , &block )
77
+ if m =~ /^map_/
78
+ model . send ( m , *args , &block )
79
+ else
80
+ super
81
+ end
82
+ end
83
+
68
84
protected
69
85
70
86
# Request the next set in this sequence.
@@ -120,7 +136,7 @@ def sql_conditions(opts)
120
136
sql << "#{ timestamp_field } >= ?" << "#{ timestamp_field } <= ?"
121
137
sql << "set = ?" if opts [ :set ]
122
138
esc_values = [ sql . join ( " AND " ) ]
123
- esc_values << Time . parse ( opts [ :from ] ) . localtime << Time . parse ( opts [ :until ] ) . localtime #-- OAI 2.0 hack - UTC fix from record_responce
139
+ esc_values << Time . parse ( opts [ :from ] . to_s ) . localtime << Time . parse ( opts [ :until ] . to_s ) . localtime . to_s #-- OAI 2.0 hack - UTC fix from record_responce
124
140
esc_values << opts [ :set ] if opts [ :set ]
125
141
126
142
return esc_values
You can’t perform that action at this time.
0 commit comments