Start cleanup of deprecations in ActionView
Signed-off-by: José Valim <jose.valim@gmail.com>
This commit is contained in:
parent
022fd876bb
commit
c915ddd386
@ -7,25 +7,6 @@ module ActionView
|
||||
# = Active Model Helpers
|
||||
module Helpers
|
||||
module ActiveModelHelper
|
||||
%w(input form error_messages_for error_message_on).each do |method|
|
||||
class_eval <<-RUBY, __FILE__, __LINE__ + 1
|
||||
def #{method}(*args)
|
||||
ActiveSupport::Deprecation.warn "#{method} was removed from Rails and is now available as a plugin. " <<
|
||||
"Please install it with `rails plugin install git://github.com/rails/dynamic_form.git`.", caller
|
||||
end
|
||||
RUBY
|
||||
end
|
||||
end
|
||||
|
||||
module ActiveModelFormBuilder
|
||||
%w(error_messages error_message_on).each do |method|
|
||||
class_eval <<-RUBY, __FILE__, __LINE__ + 1
|
||||
def #{method}(*args)
|
||||
ActiveSupport::Deprecation.warn "f.#{method} was removed from Rails and is now available as a plugin. " <<
|
||||
"Please install it with `rails plugin install git://github.com/rails/dynamic_form.git`.", caller
|
||||
end
|
||||
RUBY
|
||||
end
|
||||
end
|
||||
|
||||
module ActiveModelInstanceTag
|
||||
@ -67,10 +48,6 @@ def tag_generate_errors?(options)
|
||||
end
|
||||
end
|
||||
|
||||
class FormBuilder
|
||||
include ActiveModelFormBuilder
|
||||
end
|
||||
|
||||
class InstanceTag
|
||||
include ActiveModelInstanceTag
|
||||
end
|
||||
|
@ -594,11 +594,6 @@ def convert_options_to_data_attributes(options, html_options)
|
||||
end
|
||||
|
||||
confirm = html_options.delete("confirm")
|
||||
|
||||
if html_options.key?("popup")
|
||||
ActiveSupport::Deprecation.warn(":popup has been deprecated", caller)
|
||||
end
|
||||
|
||||
method, href = html_options.delete("method"), html_options['href']
|
||||
|
||||
add_confirm_to_attributes!(html_options, confirm) if confirm
|
||||
|
@ -59,12 +59,4 @@ def test_field_error_proc
|
||||
ensure
|
||||
ActionView::Base.field_error_proc = old_proc if old_proc
|
||||
end
|
||||
|
||||
def test_deprecations
|
||||
%w(input form error_messages_for error_message_on).each do |method|
|
||||
assert_deprecated do
|
||||
send(method, "post")
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user