Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

removed semantic_remote_form_for and aliases, because the methods the…

…y wrap are not in Rails 3
  • Loading branch information...
commit 38fae41066267182d7faf12eb0a809806bb624f0 1 parent 52a9df3
@justinfrench authored
View
1  CHANGELOG
@@ -20,6 +20,7 @@
* Changed quick forms to skip polymorphic associations (they didn't work)
* Changed short hand forms to raise an error when trying to render an input for a polymorphic association (it didn't work, need a collection)
* Changed input() to raise an error when a :collection is not provided for a polymorphic association (we can't guess which class to use)
+* Removed semantic_remote_form_for etc, the remote_form_for helpers don't exist in Rails 3
1.2.4.beta (unreleased)
View
23 lib/formtastic/helpers/form_helper.rb
@@ -151,29 +151,6 @@ def semantic_fields_for(record_or_name_or_array, *args, &proc)
form_helper_wrapper(:fields_for, record_or_name_or_array, *args, &proc)
end
- # Wrapper around Rails' own `remote_form_for` helper to set the `:builder` option to
- # `Formtastic::FormBuilder` and to set some class names on the `<form>` tag such as
- # `formtastic` and the downcased and underscored model name.
- #
- # @see #semantic_form_for
- # @todo why isn't YARD rendering this method?
- def semantic_remote_form_for(record_or_name_or_array, *args, &proc)
- form_helper_wrapper(:remote_form_for, record_or_name_or_array, *args, &proc)
- end
-
- def semantic_remote_form_for_wrapper(record_or_name_or_array, *args, &proc)
- options = args.extract_options!
- if respond_to? :remote_form_for
- semantic_remote_form_for_real(record_or_name_or_array, *(args << options), &proc)
- else
- options[:remote] = true
- semantic_form_for(record_or_name_or_array, *(args << options), &proc)
- end
- end
- alias :semantic_remote_form_for_real :semantic_remote_form_for
- alias :semantic_remote_form_for :semantic_remote_form_for_wrapper
- alias :semantic_form_remote_for :semantic_remote_form_for
-
protected
# @todo pretty sure some of this (like HTML classes and record naming are exlusive to `form_for`)
View
16 spec/helpers/form_helper_spec.rb
@@ -131,21 +131,5 @@ class MyAwesomeCustomBuilder < Formtastic::FormBuilder
end
end
- describe '#semantic_form_remote_for' do
- it 'yields an instance of Formtastic::FormBuilder' do
- semantic_form_remote_for(@new_post, :url => '/hello') do |builder|
- builder.class.should == Formtastic::FormBuilder
- end
- end
- end
-
- describe '#semantic_form_for_remote' do
- it 'yields an instance of Formtastic::FormBuilder' do
- semantic_remote_form_for(@new_post, :url => '/hello') do |builder|
- builder.class.should == Formtastic::FormBuilder
- end
- end
- end
-
end
Please sign in to comment.
Something went wrong with that request. Please try again.