Skip to content

Commit

Permalink
Fix label translation comment
Browse files Browse the repository at this point in the history
  • Loading branch information
carlosantoniodasilva committed Dec 8, 2010
1 parent dc46c17 commit be8137c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/simple_form/components/labels.rb
Expand Up @@ -52,7 +52,7 @@ def required_label_text #:nodoc:
attribute_required? ? self.class.translate_required_html.dup : ''
end

# First check human attribute name and then labels.
# First check labels translation and then human attribute name.
def label_translation #:nodoc:
translate(:labels) || if object.class.respond_to?(:human_attribute_name)
object.class.human_attribute_name(reflection_or_attribute_name.to_s)
Expand All @@ -62,4 +62,4 @@ def label_translation #:nodoc:
end
end
end
end
end

0 comments on commit be8137c

Please sign in to comment.