lib/alephant/views/base.rb in alephant-renderer-0.0.9 vs lib/alephant/views/base.rb in alephant-renderer-0.0.10

- old
+ new

@@ -17,10 +17,11 @@ end def t(key, params = {}) I18n.locale = locale prefix = /\/([^\/]+)\.mustache/.match(template_file)[1] - I18n.translate("#{prefix}.#{key}", params) + params.merge! :default => key unless params[:default] + translation = I18n.translate("#{prefix}.#{key}", params) end def self.inherited(subclass) ::Alephant::Views.register(subclass) end