Skip to content

Commit

Permalink
Use helpers.label instead of views.labels.
Browse files Browse the repository at this point in the history
  • Loading branch information
josevalim committed Jan 7, 2010
1 parent 319e4aa commit b7fd426
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion actionpack/lib/action_view/helpers/form_helper.rb
Expand Up @@ -765,7 +765,7 @@ def to_label_tag(text = nil, options = {})
options["for"] ||= name_and_id["id"]

content = if text.blank?
i18n_label = I18n.t("views.labels.#{object_name}.#{method_name}", :default => "")
i18n_label = I18n.t("helpers.label.#{object_name}.#{method_name}", :default => "")
i18n_label if i18n_label.present?
else
text.to_s
Expand Down
4 changes: 2 additions & 2 deletions actionpack/test/template/form_helper_test.rb
Expand Up @@ -96,8 +96,8 @@ def setup

# Create "label" locale for testing I18n label helpers
I18n.backend.store_translations 'label', {
:views => {
:labels => {
:helpers => {
:label => {
:post => {
:body => "Write entire text here"
}
Expand Down

0 comments on commit b7fd426

Please sign in to comment.