Permalink
Browse files

Added support for file to form helper

  • Loading branch information...
1 parent 8ff086d commit 1a07b264824e81f3ee835ef0f0e5be9f9d2ca880 David Butler committed Mar 22, 2012
Showing with 7 additions and 0 deletions.
  1. +7 −0 lib/helpers.js
View
7 lib/helpers.js
@@ -257,6 +257,13 @@ HelperSet.prototype.fields_for = function (resource, block) {
type: 'checkbox'
});
},
+ file: function (name, params) {
+ return HelperSet.prototype.input_tag({
+ name: makeName(name),
+ id: makeId(name),
+ type: 'file'
+ }, params);
+ },
label: function (name, caption, params) {
return HelperSet.prototype.label_tag(
caption || self.controller.t('models.' + resource.constructor.modelName + '.fields.' + name, humanize(name)),

0 comments on commit 1a07b26

Please sign in to comment.