diff --git a/app/helpers/modal_helper.rb b/app/helpers/modal_helper.rb index 9c9170ce..92be36ac 100644 --- a/app/helpers/modal_helper.rb +++ b/app/helpers/modal_helper.rb @@ -7,7 +7,7 @@ def default_options #modals have a header, a body, a footer for options. def modal_dialog(options = {}, &block) opts = default_options.merge(options) - content_tag :div, :id => options[:id], :class => "bootstrap-modal modal fade" do + content_tag :div, :class => "bootstrap-modal modal fade", :id => options[:id] do content_tag :div, :class => "modal-dialog #{opts['size']}" do content_tag :div, :class => "modal-content" do modal_header(options[:header], &block) + diff --git a/spec/lib/twitter_bootstrap_rails/modal_helper_spec.rb b/spec/lib/twitter_bootstrap_rails/modal_helper_spec.rb index eb403711..ac237521 100644 --- a/spec/lib/twitter_bootstrap_rails/modal_helper_spec.rb +++ b/spec/lib/twitter_bootstrap_rails/modal_helper_spec.rb @@ -36,7 +36,7 @@ end it 'renders a cancel button' do - expect(modal_cancel_button("Cancel", :href => "#modal", :data => {:dismiss => 'modal'}).gsub(/\n/, "")).to eql MODAL_CANCEL_BUTTON.gsub(/\n/, "") + expect(modal_cancel_button("Cancel", :data => {:dismiss => 'modal'}, :href => "#modal").gsub(/\n/, "")).to eql MODAL_CANCEL_BUTTON.gsub(/\n/, "") end end diff --git a/spec/lib/twitter_bootstrap_rails/navbar_helper_spec.rb b/spec/lib/twitter_bootstrap_rails/navbar_helper_spec.rb index 89787f63..9814f148 100644 --- a/spec/lib/twitter_bootstrap_rails/navbar_helper_spec.rb +++ b/spec/lib/twitter_bootstrap_rails/navbar_helper_spec.rb @@ -107,7 +107,7 @@ end it "should pass any other options through to the link_to method" do allow(self).to receive_message_chain("uri_state").and_return(:active) - expect(menu_item("Log out", "/users/sign_out", :class => "home_link", :method => :delete)).to eql('
  • Log out
  • ') + expect(menu_item("Log out", "/users/sign_out", :class => "home_link", :method => :delete)).to eql('
  • Log out
  • ') end it "should pass a block but no name if a block is present" do allow(self).to receive(:current_page?) { false }