Sha256: 4c0cc4abdc3bea72ed6c7ddbc22281a48f6963fd2153898ed284504c51e445fb
Contents?: true
Size: 610 Bytes
Versions: 2
Compression:
Stored size: 610 Bytes
Contents
module PushType class Node < ActiveRecord::Base include PushType::Customizable include PushType::Nestable include PushType::Templatable include PushType::Publishable include PushType::Trashable belongs_to :creator, class_name: 'PushType::User' belongs_to :updater, class_name: 'PushType::User' acts_as_tree name_column: 'slug', order: 'sort_order' validates :title, presence: true validates :slug, presence: true, uniqueness: { scope: :parent_id } def permalink @permalink ||= self_and_ancestors.map(&:slug).reverse.join('/') end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
push_type_core-0.1.1 | app/models/push_type/node.rb |
push_type_core-0.1.0 | app/models/push_type/node.rb |