Sha256: 10328d767f4aed2f9ab1932571ab9ee76fb9a789d9b6f2d4186d198c2a03de39

Contents?: true

Size: 559 Bytes

Versions: 2

Compression:

Stored size: 559 Bytes

Contents

module ActiveAdmin
  module ViewHelpers
    module FormHelper

      def active_admin_form_for(resource, options = {}, &block)
        Arbo::Context.new({}, self) do
          active_admin_form_for resource, options, &block
        end.render_in.html_safe
      end

      def hidden_field_tags_for(params, options = {})
        fields_for_params(params.to_unsafe_hash, options).map do |kv|
          k, v = kv.first
          hidden_field_tag k, v, id: sanitize_to_id("hidden_active_admin_#{k}")
        end.join("\n").html_safe
      end

    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
activeadmin-rails-1.7.1 lib/active_admin/view_helpers/form_helper.rb
activeadmin-rails-1.7.0 lib/active_admin/view_helpers/form_helper.rb