From b15f0bd957dae0ae23140135b01506fbeca2a1e5 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Wed, 9 Jul 2014 23:26:06 -0400 Subject: mv config/initializers/{form_improvements,leaguer_firefox_submit_hack}.rb Note: this is no longer required in Firefox 30. --- config/initializers/form_improvements.rb | 31 -------------------- config/initializers/leaguer_firefox_submit_hack.rb | 34 ++++++++++++++++++++++ 2 files changed, 34 insertions(+), 31 deletions(-) delete mode 100644 config/initializers/form_improvements.rb create mode 100644 config/initializers/leaguer_firefox_submit_hack.rb diff --git a/config/initializers/form_improvements.rb b/config/initializers/form_improvements.rb deleted file mode 100644 index c91dce8..0000000 --- a/config/initializers/form_improvements.rb +++ /dev/null @@ -1,31 +0,0 @@ -# -*- ruby-indent-level: 2; indent-tabs-mode: nil -*- -module ActionView - module Helpers - module FormTagHelper - - # This is modified from actionpack-4.0.2/lib/action_view/helpers/form_tag_helper.rb#submit_tag - def submit_tag(value = "Save changes", options = {}) - options = options.stringify_keys - - if disable_with = options.delete("disable_with") - message = ":disable_with option is deprecated and will be removed from Rails 4.1. " \ - "Use 'data: { disable_with: \'Text\' }' instead." - ActiveSupport::Deprecation.warn message - - options["data-disable-with"] = disable_with - end - - if confirm = options.delete("confirm") - message = ":confirm option is deprecated and will be removed from Rails 4.1. " \ - "Use 'data: { confirm: \'Text\' }' instead'." - ActiveSupport::Deprecation.warn message - - options["data-confirm"] = confirm - end - - content_tag(:button, value, { "type" => "submit", "name" => "commit", "value" => value }.update(options)) - end - - end - end -end diff --git a/config/initializers/leaguer_firefox_submit_hack.rb b/config/initializers/leaguer_firefox_submit_hack.rb new file mode 100644 index 0000000..2120379 --- /dev/null +++ b/config/initializers/leaguer_firefox_submit_hack.rb @@ -0,0 +1,34 @@ +# -*- ruby-indent-level: 2; indent-tabs-mode: nil -*- +# This hacks around being sized weird by replacing it with