Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Prop < ActiveRecord::Base
- #Validates fields for data entered by user when submitted
- validates_presence_of :title, :category, :availability, :keywords, :description, :price
- validates_numericality_of :price, :on => :save
- validates_numericality_of :year, :on => :create
- def list_by(field, item)
- self.find(:one, :params => { field => item })
- end
- end
Add Comment
Please, Sign In to add comment