delocalize 0.2.1 → 0.2.2
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.
- data/VERSION +1 -1
- data/lib/delocalize/rails_ext/active_record.rb +4 -1
- metadata +3 -3
data/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
0.2.
|
|
1
|
+
0.2.2
|
|
@@ -47,7 +47,10 @@ ActiveRecord::Base.class_eval do
|
|
|
47
47
|
alias_method_chain :convert_number_column_value, :localization
|
|
48
48
|
end
|
|
49
49
|
|
|
50
|
-
|
|
50
|
+
# The dirty module has been moved to ActiveModel in Rails 3
|
|
51
|
+
dirty_module = defined?(ActiveRecord::Dirty) ? ActiveRecord::Dirty : ActiveModel::Dirty
|
|
52
|
+
|
|
53
|
+
dirty_module.module_eval do
|
|
51
54
|
def field_changed?(attr, old, value)
|
|
52
55
|
if column = column_for_attribute(attr)
|
|
53
56
|
if column.number? && column.null && (old.nil? || old == 0) && value.blank?
|
metadata
CHANGED
|
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
|
|
|
5
5
|
segments:
|
|
6
6
|
- 0
|
|
7
7
|
- 2
|
|
8
|
-
-
|
|
9
|
-
version: 0.2.
|
|
8
|
+
- 2
|
|
9
|
+
version: 0.2.2
|
|
10
10
|
platform: ruby
|
|
11
11
|
authors:
|
|
12
12
|
- Clemens Kofler
|
|
@@ -14,7 +14,7 @@ autorequire:
|
|
|
14
14
|
bindir: bin
|
|
15
15
|
cert_chain: []
|
|
16
16
|
|
|
17
|
-
date: 2010-06-
|
|
17
|
+
date: 2010-06-26 00:00:00 +02:00
|
|
18
18
|
default_executable:
|
|
19
19
|
dependencies: []
|
|
20
20
|
|