Skip to content

Instantly share code, notes, and snippets.

@camelpunch
Created March 15, 2010 11:24
Show Gist options
  • Select an option

  • Save camelpunch/332749 to your computer and use it in GitHub Desktop.

Select an option

Save camelpunch/332749 to your computer and use it in GitHub Desktop.
module ApplicationHelper
def file_field(object_name, method, options = {})
options.delete :size
ActionView::Helpers::InstanceTag.new(object_name, method, self, options.delete(:object)).
to_input_field_tag("file", options).
sub('size="30"', '')
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment