public
Last active

Mike Pack Solr Article

  • Download Gist
gistfile1.rb
Ruby
1 2 3 4 5
class Product < ActiveRecord::Base
validates :name, :color, :used, :presence => true
validates :name, :uniqueness => true
validates :used, :inclusion => {:in => [true, false]}
end

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.