russian 0.2.1 → 0.2.2
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG +6 -0
- data/Rakefile +1 -1
- data/lib/russian.rb +1 -1
- data/lib/russian/active_record_ext/custom_error_message.rb +3 -4
- metadata +2 -2
data/CHANGELOG
CHANGED
@@ -1,3 +1,9 @@
|
|
1
|
+
=== 0.2.2 - 17.09.2008
|
2
|
+
|
3
|
+
* Fix ^-prefixed error messages handling on Rails 2.3.4
|
4
|
+
|
5
|
+
* Для Rails 2.3.4 исправлена работа сообщений валидаций, начинающихся с "^"
|
6
|
+
|
1
7
|
=== 0.2.1 - 5.09.2009
|
2
8
|
|
3
9
|
* Rails 2.3.4 compat (ActiveRecord::Error) and deprecation warning (use errors.full_messages.format from now on) [Alexander Semyonov/Yaroslav Markin]
|
data/Rakefile
CHANGED
data/lib/russian.rb
CHANGED
@@ -39,16 +39,15 @@ if (ma >= 2 && mi >= 3 && ti >= 4)
|
|
39
39
|
:value => value
|
40
40
|
|
41
41
|
key = :"full_messages.#{@message}"
|
42
|
+
defaults = [:'full_messages.format', '{{attribute}} {{message}}']
|
42
43
|
|
43
44
|
if options[:message].is_a?(String) && options[:message] =~ /^\^/
|
44
45
|
ActiveSupport::Deprecation.warn("Using '^' hack for ActiveRecord error messages has been deprecated. Please use errors.full_messages.format I18n key for formatting")
|
45
46
|
|
46
47
|
options[:full_message] = options[:message][1..-1]
|
47
|
-
defaults = [:
|
48
|
-
else
|
49
|
-
defaults = [:'full_messages.format', '{{attribute}} {{message}}']
|
48
|
+
defaults = [:"full_messages.#{@message}.format", '{{full_message}}']
|
50
49
|
end
|
51
|
-
|
50
|
+
|
52
51
|
I18n.t(key, options.merge(:default => defaults, :scope => [:activerecord, :errors]))
|
53
52
|
end
|
54
53
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: russian
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Yaroslav Markin
|
@@ -9,7 +9,7 @@ autorequire: russian
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2009-09-
|
12
|
+
date: 2009-09-18 00:00:00 +04:00
|
13
13
|
default_executable:
|
14
14
|
dependencies: []
|
15
15
|
|