Sha256: 1ae064712936ef588e5aeddabb01c45cacae6da81ab64b7ba84fe9379964c60f

Contents?: true

Size: 653 Bytes

Versions: 1

Compression:

Stored size: 653 Bytes

Contents

module StyledInputs
  module Extensions #:nodoc:
    # Adds support for hooking calls to +tag+ for form fields
    module InstanceTag
      def self.included(base) #:nodoc:
        base.class_eval do
          alias_method_chain :tag, :styled_inputs
        end
      end
      
      # Ensure that the options are updated for input tags before generating
      # the html for the tag
      def tag_with_styled_inputs(name, options, *args) #:nodoc:
        tag_without_styled_inputs(name, styled_input(name, options), *args)
      end
    end
  end
end

ActionView::Helpers::InstanceTag.class_eval do
  include StyledInputs::Extensions::InstanceTag
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
styled_inputs-0.1.0 lib/styled_inputs/extensions/instance_tag.rb