Sha256: f50bd36c702d7d0b0d0be422707e6f6a59b3b6ea4b97a389fce7d034120bce73
Contents?: true
Size: 528 Bytes
Versions: 13
Compression:
Stored size: 528 Bytes
Contents
class Relation < ActiveRecord::Base validate :valid_relation attr_accessor :side, :link_errors, :start, :link attr_protected :site_id has_many :links, :dependent => :destroy # FIXME: validate uniqueness of source_role and target_role in scope site_id # FIXME: set kpath from class private def valid_relation unless visitor.is_admin? errors.add('base', 'You do not have the rights to do this.') return false end self[:site_id] = current_site[:id] end end
Version data entries
13 entries across 13 versions & 1 rubygems