diff --git a/CHANGELOG.md b/CHANGELOG.md index 148f3585..fc113961 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,9 @@ +## 3.0.0.dev + +### enhancements + * Support to Rails 4. + * Removed deprecated methods. + ## 2.1.0.dev ### enhancements diff --git a/lib/simple_form/action_view_extensions/builder.rb b/lib/simple_form/action_view_extensions/builder.rb index bd08f15f..b79a56eb 100644 --- a/lib/simple_form/action_view_extensions/builder.rb +++ b/lib/simple_form/action_view_extensions/builder.rb @@ -3,12 +3,6 @@ module SimpleForm # A collection of methods required by simple_form but added to rails default form. # This means that you can use such methods outside simple_form context. module Builder - # deprecated - def collection_radio(*args, &block) - SimpleForm.deprecation_warn "The `collection_radio` helper is deprecated, " \ - "please use `collection_radio_buttons` instead." - collection_radio_buttons(*args, &block) - end # Wrapper for using SimpleForm inside a default rails form. # Example: diff --git a/lib/simple_form/form_builder.rb b/lib/simple_form/form_builder.rb index f9139e66..4fd1d9ec 100644 --- a/lib/simple_form/form_builder.rb +++ b/lib/simple_form/form_builder.rb @@ -362,12 +362,6 @@ module SimpleForm column = find_attribute_column(attribute_name) input_type = default_input_type(attribute_name, column, options) - if input_type == :radio - SimpleForm.deprecation_warn "Using `:as => :radio` as input type is " \ - "deprecated, please change it to `:as => :radio_buttons`." - input_type = :radio_buttons - end - if block_given? SimpleForm::Inputs::BlockInput.new(self, attribute_name, column, input_type, options, &block) else diff --git a/lib/simple_form/wrappers/builder.rb b/lib/simple_form/wrappers/builder.rb index 1e041505..25d9f6a9 100644 --- a/lib/simple_form/wrappers/builder.rb +++ b/lib/simple_form/wrappers/builder.rb @@ -46,18 +46,6 @@ module SimpleForm end def use(name, options=nil, &block) - if block_given? - ActiveSupport::Deprecation.warn "Passing a block to use is deprecated. " \ - "Please use wrapper instead of use." - return wrapper(name, options, &block) - end - - if options && options.keys != [:wrap_with] - ActiveSupport::Deprecation.warn "Passing :tag, :class and others to use is deprecated. " \ - "Please invoke b.use #{name.inspect}, :wrap_with => #{options.inspect} instead." - options = { :wrap_with => options } - end - if options && wrapper = options[:wrap_with] @components << Single.new(name, wrapper) else @@ -66,18 +54,6 @@ module SimpleForm end def optional(name, options=nil, &block) - if block_given? - ActiveSupport::Deprecation.warn "Passing a block to optional is deprecated. " \ - "Please use wrapper instead of optional." - return wrapper(name, options, &block) - end - - if options && options.keys != [:wrap_with] - ActiveSupport::Deprecation.warn "Passing :tag, :class and others to optional is deprecated. " \ - "Please invoke b.optional #{name.inspect}, :wrap_with => #{options.inspect} instead." - options = { :wrap_with => options } - end - @options[name] = false use(name, options, &block) end diff --git a/test/action_view_extensions/builder_test.rb b/test/action_view_extensions/builder_test.rb index 5accf708..01a7468c 100644 --- a/test/action_view_extensions/builder_test.rb +++ b/test/action_view_extensions/builder_test.rb @@ -242,18 +242,6 @@ class BuilderTest < ActionView::TestCase end end - test 'collection_radio helper is deprecated in favor of collection_radio_buttons' do - assert_deprecated "[SIMPLE_FORM] The `collection_radio` helper is deprecated, " \ - "please use `collection_radio_buttons` instead" do - with_concat_form_for(@user) do |f| - f.collection_radio :active, [true, false], :to_s, :to_s - end - end - - assert_select 'input[type=radio][value=true]' - assert_select 'input[type=radio][value=false]' - end - # COLLECTION CHECK BOX test 'collection check box accepts a collection and generate a serie of checkboxes for value method' do collection = [Tag.new(1, 'Tag 1'), Tag.new(2, 'Tag 2')] diff --git a/test/inputs/collection_radio_buttons_input_test.rb b/test/inputs/collection_radio_buttons_input_test.rb index 216880fb..f0a394c7 100644 --- a/test/inputs/collection_radio_buttons_input_test.rb +++ b/test/inputs/collection_radio_buttons_input_test.rb @@ -6,15 +6,6 @@ class CollectionRadioButtonsInputTest < ActionView::TestCase SimpleForm::Inputs::CollectionRadioButtonsInput.reset_i18n_cache :boolean_collection end - test 'input :as => :radio is deprecated in favor of :as => :radio_buttons' do - assert_deprecated "[SIMPLE_FORM] Using `:as => :radio` as " \ - "input type is deprecated, please change it to `:as => :radio_buttons`." do - with_input_for @user, :active, :radio - end - - assert_select 'input[type=radio].radio_buttons', :count => 2 - end - test 'input should generate boolean radio buttons by default for radio types' do with_input_for @user, :active, :radio_buttons assert_select 'input[type=radio][value=true].radio_buttons#user_active_true'