closing textarea tags do not break the page form anymore

This commit is contained in:
Didier Lafforgue 2012-04-17 16:13:21 +02:00
parent 67c36191d2
commit 1d19d606b8
5 changed files with 15 additions and 5 deletions

View File

@ -45,5 +45,7 @@ group :test do
gem 'xpath', '~> 0.1.4'
gem 'json_spec'
gem 'database_cleaner'
end

View File

@ -42,7 +42,7 @@ PATH
dragonfly (~> 0.9.8)
flash_cookie_session (~> 1.1.1)
fog (~> 1.3.1)
formtastic (~> 2.0.2)
formtastic (~> 2.2.0)
haml (~> 3.1.4)
highline (~> 1.6.2)
httparty (~> 0.8.1)
@ -176,8 +176,8 @@ GEM
nokogiri (~> 1.5.0)
ruby-hmac
formatador (0.2.1)
formtastic (2.0.2)
rails (~> 3.0)
formtastic (2.2.0)
actionpack (>= 3.0)
fssm (0.2.9)
gherkin (2.9.3)
json (>= 1.4.6)
@ -193,6 +193,9 @@ GEM
railties (~> 3.0)
thor (~> 0.14)
json (1.6.6)
json_spec (1.0.0)
multi_json (~> 1.0)
rspec (~> 2.0)
kaminari (0.13.0)
actionpack (>= 3.0.0)
activesupport (>= 3.0.0)
@ -335,6 +338,7 @@ DEPENDENCIES
custom_fields!
database_cleaner
factory_girl_rails (~> 1.6.0)
json_spec
launchy
locomotive_cms!
mocha (= 0.9.12)

View File

@ -19,6 +19,8 @@ require 'capybara/rails'
require 'capybara/cucumber'
require 'capybara/session'
require 'json_spec/cucumber'
require 'resolv'
require 'uri'

View File

@ -17,7 +17,9 @@ module ActionView
content_tag_without_haml(name, content_or_options_with_block, *args, &block)
end
else
if preserve && content_or_options_with_block
if name == 'textarea'
tab_down(haml_buffer.tabulation)
elsif preserve && content_or_options_with_block
content_or_options_with_block = Haml::Helpers.preserve(content_or_options_with_block)
end
content_tag_without_haml(name, content_or_options_with_block, *args, &block)

View File

@ -43,7 +43,7 @@ Gem::Specification.new do |s|
s.add_dependency 'flash_cookie_session', '~> 1.1.1'
s.add_dependency 'locomotive_liquid', '2.2.2'
s.add_dependency 'formtastic', '~> 2.0.2'
s.add_dependency 'formtastic', '~> 2.2.0'
s.add_dependency 'responders', '~> 0.6.4'
s.add_dependency 'cells', '~> 3.8.0'
s.add_dependency 'RedCloth', '~> 4.2.8'