Sha256: 07dbe2046c26aa55026a945fea26adbc67bb93f48c0ff2c4e24a6fba3c65ac53

Contents?: true

Size: 545 Bytes

Versions: 1

Compression:

Stored size: 545 Bytes

Contents

module ActionView

  module Helpers

    module FormHelper

      def add_dy_attrs_link link_name, obj, options={}
        default_options = { :container => 'dy_attrs', :partial => 'dy_attrs'}
        options = default_options.merge(options)
        link_to_function link_name do |page|
          page.insert_html :bottom, options[:container], :partial => options[:partial], :locals => {:obj => obj}
        end
      end

      def dynamic_attrs_for obj, &block
        fields_for("dy_attributes[]", obj, &block)
      end

    end

  end

end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
has_dynamic_attribute-0.1.0 lib/hda/av_form_helpers.rb