Permalink
Browse files

don't use i18n just with attribute to lookup translation if it is a m…

…odel, closes #364
  • Loading branch information...
1 parent bfe2314 commit 87974b4e412c111852fb409f27986d472ec21b4b @nashby committed Nov 26, 2011
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/simple_form/inputs/base.rb
@@ -129,7 +129,7 @@ def translate(namespace, default='')
lookups << :"#{joined_model_names}.#{lookup_action}.#{reflection_or_attribute_name}"
lookups << :"#{joined_model_names}.#{reflection_or_attribute_name}"
end
- lookups << :"#{reflection_or_attribute_name}"
+ lookups << :"#{attribute_name}" unless reflection
lookups << default
I18n.t(lookups.shift, :scope => :"simple_form.#{namespace}", :default => lookups).presence

0 comments on commit 87974b4

Please sign in to comment.