Sha256: 08d3db1986471b4456fd018b877ad8ed83e396e82cd9ce8e4c6493d40e39bf0d

Contents?: true

Size: 274 Bytes

Versions: 24

Compression:

Stored size: 274 Bytes

Contents

module FormsHelper

  def response_setup(form)
    # collect the default values together
    defaults = {}
    form.fields.collect{|f| defaults[f.underscored_name.to_sym] = f.default } unless form.nil? || form.fields.nil?

    Noodall::FormResponse.new(defaults)
  end

end

Version data entries

24 entries across 24 versions & 1 rubygems

Version Path
noodall-form-builder-0.0.4 app/helpers/forms_helper.rb
noodall-form-builder-0.0.3 app/helpers/forms_helper.rb
noodall-form-builder-0.0.2 app/helpers/forms_helper.rb
noodall-form-builder-0.0.1 app/helpers/forms_helper.rb