Sha256: 9616d6dacf71c1698ffc60ce3e39bdf373a1037a5b1b9e413efe1b2cf7d88148

Contents?: true

Size: 480 Bytes

Versions: 5

Compression:

Stored size: 480 Bytes

Contents

module Sunrise
  module FileUpload
    module FormBuilder
      def self.included(base)
        base.send(:include, ClassMethods)
      end
      
      module ClassMethods
        # Example:
		    # <%= form_for @post do |form| %>
		    #   ...
		    #   <%= form.fileupload :picture %>
		    # <% end %>
		    #
		    def fileupload(method, options = {})
		      @template.fileupload_tag(@object_name, method, objectify_options(options))
        end
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
sunrise-file-upload-0.1.4 lib/sunrise/file_upload/form_builder.rb
sunrise-file-upload-0.2.0 lib/sunrise/file_upload/form_builder.rb
sunrise-file-upload-0.1.3 lib/sunrise/file_upload/form_builder.rb
sunrise-file-upload-0.1.2 lib/sunrise/file_upload/form_builder.rb
sunrise-file-upload-0.1.1 lib/sunrise/file_upload/form_builder.rb