diff --git a/lib/api_taster/form_builder.rb b/lib/api_taster/form_builder.rb index 64dbd3a..556c98d 100644 --- a/lib/api_taster/form_builder.rb +++ b/lib/api_taster/form_builder.rb @@ -8,12 +8,12 @@ class FormBuilder < AbstractController::Base def initialize(params) flush_output_buffer - @_buffer = '' + @_buffer = '' add_to_buffer(params) end def html - @_buffer + "#{@_buffer}" end private diff --git a/spec/dummy/config/routes.rb b/spec/dummy/config/routes.rb index e062f62..1a71bd8 100644 --- a/spec/dummy/config/routes.rb +++ b/spec/dummy/config/routes.rb @@ -10,10 +10,6 @@ end ApiTaster.routes do - ApiTaster.global_params = { - :version => 1 - } - get '/i_dont_exist_anymore', { :hello => 'world' } diff --git a/spec/form_builder_spec.rb b/spec/form_builder_spec.rb index 20ecb37..8ee96a6 100644 --- a/spec/form_builder_spec.rb +++ b/spec/form_builder_spec.rb @@ -48,12 +48,12 @@ module ApiTaster end it "does arrays" do - builder.html.should match(/name="\[user\]\[comment\]\[title\]\[\]" value="1"/) + builder.html.should match(/name="user\[comment\]\[title\]\[\]" value="1"/) end it "does nested arrays" do - builder.html.should match(/name="\[items\]\[\]\[nested_items\]\[\]\[nested_numbers\]\[\]" value="5"/) - builder.html.should match(/name="\[items\]\[\]\[nested_items\]\[\]\[name\]" value="apple"/) + builder.html.should match(/name="items\[\]\[nested_items\]\[\]\[nested_numbers\]\[\]" value="5"/) + builder.html.should match(/name="items\[\]\[nested_items\]\[\]\[name\]" value="apple"/) end end end