mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Merge pull request #37995 from abhaynikam/37918-fix-typo-in-class_names-helper-documentation
Fixed typo in the class_names helper documentation
This commit is contained in:
commit
0c2bb3485c
2 changed files with 2 additions and 1 deletions
|
@ -298,7 +298,7 @@ module ActionView
|
|||
# class_names({ foo: true, bar: false })
|
||||
# # => "foo"
|
||||
# class_names(nil, false, 123, "", "foo", { bar: true })
|
||||
# # => "foo bar"
|
||||
# # => "123 foo bar"
|
||||
def class_names(*args)
|
||||
safe_join(build_tag_values(*args), " ")
|
||||
end
|
||||
|
|
|
@ -347,6 +347,7 @@ class TagHelperTest < ActionView::TestCase
|
|||
assert_equal "song", class_names(["song", { foo: false }])
|
||||
assert_equal "song play", class_names({ "song": true, "play": true })
|
||||
assert_equal "", class_names({ "song": false, "play": false })
|
||||
assert_equal "123", class_names(nil, "", false, 123, { "song": false, "play": false })
|
||||
end
|
||||
|
||||
def test_content_tag_with_data_attributes
|
||||
|
|
Loading…
Reference in a new issue