Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

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

…odel, closes #364
  • Loading branch information...
commit 87974b4e412c111852fb409f27986d472ec21b4b 1 parent bfe2314
@nashby nashby authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  lib/simple_form/inputs/base.rb
View
2  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
Please sign in to comment.
Something went wrong with that request. Please try again.