Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Lookup field if only a name is given

  • Loading branch information...
commit 1a31bee0ce51971231e646af9a58b728255724f9 1 parent 79e5244
James Dabbs authored

Showing 1 changed file with 2 additions and 0 deletions. Show diff stats Hide diff stats

  1. +2 0  lib/cave/form/builder.rb
2  lib/cave/form/builder.rb
@@ -2,6 +2,8 @@
2 2
3 3 class Cave::Form::Builder < ActionView::Helpers::FormBuilder
4 4 def bootstrap control_type, field
  5 + field = object.class.fields[field] if field.is_a?(Symbol)
  6 +
5 7 error = object.errors[field.name]
6 8 value = object.lookup field.name
7 9

0 comments on commit 1a31bee

Please sign in to comment.
Something went wrong with that request. Please try again.