Sha256: aa3ef74f23d9753adb4a12cace0a045895db123343c9f8466f9e46a7649c9dc5

Contents?: true

Size: 310 Bytes

Versions: 1

Compression:

Stored size: 310 Bytes

Contents

module Smithy
  class TemplateContainer < ActiveRecord::Base
    validates_presence_of :name, :template

    belongs_to :template, inverse_of: :containers
    has_many :pages, :through => :template

    default_scope -> { order([:position, :name]) }

    def display_name
      name.titleize
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
smithycms-0.8.1 app/models/smithy/template_container.rb