module ActiveAdmin::FormBuilder::DeprecatedMethods

These methods are deprecated and removed from Formtastic, however are supported here to help with transition.

Public Instance Methods

buttons(*args, &block) click to toggle source

The buttons method always needs to be wrapped in a new buffer

# File lib/active_admin/form_builder.rb, line 117
def buttons(*args, &block)
  # Formtastic has depreciated #buttons in favor of #actions
  ::ActiveSupport::Deprecation.warn("f.buttons is deprecated in favour of f.actions")

  actions args, &block
end
commit_button(*args) click to toggle source

Formtastic has depreciated commit_button in favor of action(:submit)

# File lib/active_admin/form_builder.rb, line 98
def commit_button(*args)
  ::ActiveSupport::Deprecation.warn("f.commit_button is deprecated in favour of f.action(:submit)")

  options = args.extract_options!
  if String === args.first
    options[:label] = args.first unless options.has_key?(:label)
  end

  action(:submit, options)
end