Sha256: 7193b3b4ab75a4bcd321faa6cfcd67ad99127df8dfa15def8b7dc67d4533bbc4
Contents?: true
Size: 429 Bytes
Versions: 11
Compression:
Stored size: 429 Bytes
Contents
class DispatchLink < ActiveRecord::Base # Relationships belongs_to :dispatch, :foreign_key => :dispatch_id has_many :clicks, :class_name => "DispatchLinkClick" default_scope { order("clicks_count DESC") } # Validations # validates_presence_of :uri # validates_presence_of :dispatch # validates_uniqueness_of :position, :scope => :dispatch_id # open up everything for mass assignment attr_protected end
Version data entries
11 entries across 11 versions & 1 rubygems