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 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
@@ -5,7 +5,7 @@ require 'rubygems/specification'
5
5
  require 'date'
6
6
 
7
7
  GEM = "russian"
8
- GEM_VERSION = "0.2.1"
8
+ GEM_VERSION = "0.2.2"
9
9
  AUTHOR = "Yaroslav Markin"
10
10
  EMAIL = "yaroslav@markin.net"
11
11
  HOMEPAGE = "http://github.com/yaroslav/russian/"
@@ -29,7 +29,7 @@ module Russian
29
29
  module VERSION
30
30
  MAJOR = 0
31
31
  MINOR = 2
32
- TINY = 1
32
+ TINY = 2
33
33
 
34
34
  STRING = [MAJOR, MINOR, TINY].join('.')
35
35
  end
@@ -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 = [:'full_messages.format', '{{full_message}}']
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.1
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-05 00:00:00 +04:00
12
+ date: 2009-09-18 00:00:00 +04:00
13
13
  default_executable:
14
14
  dependencies: []
15
15