Skip to content

Instantly share code, notes, and snippets.

@MarkPochert
Created January 21, 2011 10:41
Show Gist options
  • Save MarkPochert/789518 to your computer and use it in GitHub Desktop.
Save MarkPochert/789518 to your computer and use it in GitHub Desktop.
class Offer < ActiveRecord::Base
belongs_to :user
attr_readonly :user
attr_accessible :user,:title,:description,:price
validates :user, :presence => true
validates :title, :presence => true
validates :description, :presence => true
validates :price, :presence => true
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment