acts_as_historical 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/acts_as_historical.gemspec +1 -1
- data/lib/acts_as_historical.rb +3 -3
- metadata +1 -1
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.0.
|
1
|
+
0.0.2
|
data/acts_as_historical.gemspec
CHANGED
data/lib/acts_as_historical.rb
CHANGED
@@ -16,11 +16,11 @@ module ActsAsHistorical
|
|
16
16
|
#
|
17
17
|
def acts_as_historical(opts = {})
|
18
18
|
configuration = {
|
19
|
-
|
19
|
+
# :date_column => "snapshot_date",
|
20
20
|
:days => :all_days,
|
21
21
|
:scope => nil
|
22
22
|
}
|
23
|
-
configuration.update(
|
23
|
+
configuration.update(opts) if opts.is_a?(Hash)
|
24
24
|
|
25
25
|
send :include, InstanceMethods
|
26
26
|
send :extend, DynamicClassMethods
|
@@ -32,7 +32,7 @@ module ActsAsHistorical
|
|
32
32
|
send :extend, WeekDays::ClassMethods
|
33
33
|
end
|
34
34
|
self.cattr_accessor :historical_date_col, :historical_scope, :only_weekdays
|
35
|
-
self.historical_date_col = configuration[:date_column]
|
35
|
+
self.historical_date_col = 'snapshot_date' #configuration[:date_column]
|
36
36
|
self.historical_scope = configuration[:scope]
|
37
37
|
|
38
38
|
order_desc = "#{self.historical_date_col_sql} DESC"
|