Skip to content

Commit

Permalink
Revert "Fix attribution of HTML attributes."
Browse files Browse the repository at this point in the history
  • Loading branch information
AlfonsoUceda committed Aug 28, 2015
1 parent 140ade5 commit 98644ef
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 14 deletions.
5 changes: 0 additions & 5 deletions lib/lotus/helpers/form_helper/form_builder.rb
Expand Up @@ -526,11 +526,6 @@ def file_field(name, attributes = {})
# # Output:
# # <textarea name="user[hobby]" id="user-hobby">Football</textarea>
def text_area(name, content = nil, attributes = {})
if content.is_a? Hash
attributes = content
content = nil
end

attributes = {name: _input_name(name), id: _input_id(name)}.merge(attributes)
_content = content || _value(name)
textarea(_content, attributes)
Expand Down
9 changes: 0 additions & 9 deletions test/form_helper_test.rb
Expand Up @@ -762,14 +762,6 @@
actual.must_include %(<textarea name="book[description]" id="book-description" class="form-control" cols="5"></textarea>)
end

it "renders all HTML attributes along with the name and id" do
actual = view.form_for(:book, action) do
text_area :description, class: 'form-control', cols: '5'
end.to_s

actual.must_include %(<textarea name="book[description]" id="book-description" class="form-control" cols="5"></textarea>)
end

describe "set content explicitly" do
let(:content) { "A short description of the book" }
it "allows to set content" do
Expand Down Expand Up @@ -802,7 +794,6 @@
end
end
end

describe "#text_field" do
it "renders" do
actual = view.form_for(:book, action) do
Expand Down

0 comments on commit 98644ef

Please sign in to comment.