search for: contact_detail

Displaying 1 result from an estimated 1 matches for "contact_detail".

Did you mean: contact_details
2006 Aug 16
3
Validate your forms with a table-less model
...model class: class Contact < ActiveRecord::Base def self.columns() @columns ||= []; end def self.column(name, sql_type = nil, default = nil, null = true) columns << ActiveRecord::ConnectionAdapters::Column.new(name.to_s, default, sql_type.to_s, null) end column :name, :string column :contact_details, :string column :subject, :string column :query, :string validates_presence_of :name, :contact_details, :query end Can anyone help me please? -- Posted via http://www.ruby-forum.com/.