smarter_dates 0.2.7.10 → 0.2.7.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -45,7 +45,11 @@ def self.included( klass ) # :nodoc:
45
45
  dt = val
46
46
  end
47
47
  if defined?(Rails)
48
- self[k] = dt
48
+ if k.match(/_(?:on|d)$/)
49
+ self[k] = dt.to_date
50
+ else
51
+ self[k] = dt.to_datetime
52
+ end
49
53
  else
50
54
  instance_variable_set(:"@#{k}",dt)
51
55
  end
@@ -1,4 +1,4 @@
1
1
  module SmarterDates
2
- VERSION = '0.2.7.10'
2
+ VERSION = '0.2.7.11'
3
3
  end
4
4
 
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: smarter_dates
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.2.7.10
5
+ version: 0.2.7.11
6
6
  platform: ruby
7
7
  authors:
8
8
  - Paul Belt