File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -24,7 +24,7 @@ def initialize(model, options={})
2424 )
2525 end
2626 end
27-
27+
2828 def earliest
2929 model . find ( :first ,
3030 :order => "#{ timestamp_field } asc" ) . send ( timestamp_field )
@@ -65,6 +65,22 @@ def deleted?(record)
6565 false
6666 end
6767
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+
6884 protected
6985
7086 # Request the next set in this sequence.
@@ -120,7 +136,7 @@ def sql_conditions(opts)
120136 sql << "#{ timestamp_field } >= ?" << "#{ timestamp_field } <= ?"
121137 sql << "set = ?" if opts [ :set ]
122138 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
124140 esc_values << opts [ :set ] if opts [ :set ]
125141
126142 return esc_values
You can’t perform that action at this time.
0 commit comments