Displaying 1 result from an estimated 1 matches for "rrecord".
Did you mean:
  record
  
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 => ''show'', :id = @record.product_id
      else...