search for: recordcontroller

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

2006 Jul 13
1
error_messages_for
I can''t seem to figure out how to validate a few fields some1 please help me out model--------- class Record < ActiveRecord::Base validates_presence_of :sw, :flex end controller------------ class RecordController < A;;icationController def new @record = Rrecord.new @product = Product.find(params[''product_id'']) end def create @Record.new(params[''record'']) if @record.valid? @record.save redirect_to :action => '...
2006 Jul 06
2
Validation Error
Hi all, I''m trying to validate a data field. I''ve added ''validate_presence_of :name'' to the record model, but when I try to create a record i get an error complaining that it can''t find data from another table that also is updated on that page. Let me explain further, On my ''record'' update page, I have data from another table