lib/rails_ext/i18n_helper.rb in rails-ext-0.2.4 vs lib/rails_ext/i18n_helper.rb in rails-ext-0.2.5
- old
+ new
@@ -29,12 +29,12 @@
_class.class_eval do
# def self.t_scope_value; end # hack, becouse of rails method_missing magic it causes error
# def t_scope_value; end # hack, becouse of rails method_missing magic it causes error
- def self.t_scope scope
- class_inheritable_accessor :t_scope_value
- self.t_scope_value = [scope + "_scope"]
+ def self.t_scope *scopes
+ class_inheritable_accessor :t_scope_value unless respond_to? :t_scope_value
+ self.t_scope_value = scopes.collect{|scope| scope + "_scope"}
end
# finding translation in all class hierarchy
def t message, params = {}
result = nil
\ No newline at end of file