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.2.8 app/helpers/forms_helper.rb
noodall-form-builder-0.2.7 app/helpers/forms_helper.rb
noodall-form-builder-0.2.5 app/helpers/forms_helper.rb
noodall-form-builder-0.2.4 app/helpers/forms_helper.rb
noodall-form-builder-0.2.3 app/helpers/forms_helper.rb
noodall-form-builder-0.2.2 app/helpers/forms_helper.rb
noodall-form-builder-0.2.1 app/helpers/forms_helper.rb
noodall-form-builder-0.2.0 app/helpers/forms_helper.rb
noodall-form-builder-0.1.3 app/helpers/forms_helper.rb
noodall-form-builder-0.1.2 app/helpers/forms_helper.rb
noodall-form-builder-0.1.1 app/helpers/forms_helper.rb
noodall-form-builder-0.1.0 app/helpers/forms_helper.rb
noodall-form-builder-0.0.13 app/helpers/forms_helper.rb
noodall-form-builder-0.0.11 app/helpers/forms_helper.rb
noodall-form-builder-0.0.10 app/helpers/forms_helper.rb
noodall-form-builder-0.0.9 app/helpers/forms_helper.rb
noodall-form-builder-0.0.8 app/helpers/forms_helper.rb
noodall-form-builder-0.0.7 app/helpers/forms_helper.rb
noodall-form-builder-0.0.6 app/helpers/forms_helper.rb
noodall-form-builder-0.0.5 app/helpers/forms_helper.rb