Sha256: e6ecb0f0d44bcfd0827f5efc8bf7dae8c9ecd3f6c31af4b4b3e52a40c8d10f72
Contents?: true
Size: 648 Bytes
Versions: 9
Compression:
Stored size: 648 Bytes
Contents
class Snippet < ActiveRecord::Base # Default Order order_by 'name' # Associations belongs_to :created_by, :class_name => 'User' belongs_to :updated_by, :class_name => 'User' # Validations validates_presence_of :name, :message => 'required' validates_length_of :name, :maximum => 100, :message => '%d-character limit' validates_length_of :filter_id, :maximum => 25, :allow_nil => true, :message => '%d-character limit' validates_format_of :name, :with => %r{^\S*$}, :message => 'cannot contain spaces or tabs' validates_uniqueness_of :name, :message => 'name already in use' object_id_attr :filter, TextFilter end
Version data entries
9 entries across 9 versions & 1 rubygems