module Ramaze module Helper module Form # Pass it an object for your ORM and options for the
" end # Decide on the strucuture of the tag based on the hash def field_for(hash) return if hash[:primary_key] args = args_for(hash) inner = case type = hash[:type] when :integer field_integer(*args) when :boolean field_boolean(*args) when :text field_textarea(*args) when :varchar field_input(*args) when :date field_date(*args) when :time field_time(*args) else Log.warn "Unknown field: %p" % hash field_input(*args) end "\n#{inner}" end private # inject to attributes for the