search for: text_field_for

Displaying 2 results from an estimated 2 matches for "text_field_for".

2007 Jul 03
2
"form_for" names fields using brackets = javascript problems
Hi all, The "form_for" helper and its friends "text_field_for" etc generate form fields with names like "forum[title]", i.e. using square brackets to denote attributes on model objects. Now, for the convenience of the user I want to do some simple client-side validation to check that some fields have been filled in. So I am trying to write jav...
2007 May 19
3
form question
Suppose I have the following models/migrations: class Car < ActiveRecord::Base belongs_to :manufacturer validates_presence_of :manufacturer validates_association :manufacturer end class CreateCars < ActiveRecord::Migration def self.up create_table cars do |t| t.column :name, :string t.column :manufacturer_id, :integer end end class Manufacturer <