Select menu validation

Is there a trick to validating select menus? I have this rule:

validates_presence_of :title, :type

:title is a text box and validates correctly but :type doesn’t:

Type

        <option value="" selected="selected"></option>

        <option value="Web">Web</option>

        <option value="Data">Data</option>

  </select>

Seth B.

Web Resources Coordinator

Kentucky Academy of Technology Education

Murray State University

Buntin, Seth - KATE wrote:

Is there a trick to validating select menus? I have this rule:

validates_presence_of :title, :type

:title is a text box and validates correctly but :type doesn?t:

You may be running into trouble because “type” is a built-in
method for all Ruby objects. Try another attribute name.
If that doesn’t fix it, post your validation code.


We develop, watch us RoR, in numbers too big to ignore.