towsta 1.2.7 → 1.2.8

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,3 +1,3 @@
1
1
  module Towsta
2
- VERSION = "1.2.7"
2
+ VERSION = "1.2.8"
3
3
  end
@@ -18,7 +18,7 @@ module Towsta
18
18
  include R18n::Helpers
19
19
 
20
20
  def i18n attr
21
- self.send (t[:models][self.class.to_s.downcase.to_sym][attr] || "#{attr.to_s}_#{t.code}").to_sym
21
+ self.send :"#{attr.to_s}_#{R18n.get.locales.first.code}"
22
22
  end
23
23
 
24
24
  def to_mail
@@ -127,6 +127,14 @@ module Towsta
127
127
  end
128
128
  end
129
129
 
130
+ def method_missing(meth, *args, &block)
131
+ begin
132
+ return self.i18n meth.to_sym
133
+ rescue
134
+ super
135
+ end
136
+ end
137
+
130
138
  end
131
139
  klass.all = []
132
140
  klass.count = args[:count]
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 1
7
7
  - 2
8
- - 7
9
- version: 1.2.7
8
+ - 8
9
+ version: 1.2.8
10
10
  platform: ruby
11
11
  authors:
12
12
  - Mortaro