Sha256: 1859afd90a1e482fd291cd84ae33e45bed109d78b3fa840d45512788f45af5eb

Contents?: true

Size: 533 Bytes

Versions: 4

Compression:

Stored size: 533 Bytes

Contents

module ActiveAdmin
  module ViewHelpers
    module FormHelper
      
      def active_admin_form_for(resource, options = {}, &block)
        options = Marshal.load( Marshal.dump(options) )
        options[:builder] ||= ActiveAdmin::FormBuilder
        semantic_form_for resource, options, &block
      end

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

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
activeadmin-0.5.1 lib/active_admin/view_helpers/form_helper.rb
activeadmin-0.5.0 lib/active_admin/view_helpers/form_helper.rb
activeadmin-0.5.0.pre1 lib/active_admin/view_helpers/form_helper.rb
activeadmin-0.5.0.pre lib/active_admin/view_helpers/form_helper.rb