Sha256: e0edfb70f8b87b39d955a1456bd2ca7c0f9f7357deef0d2c181cc428d8b85672
Contents?: true
Size: 813 Bytes
Versions: 35
Compression:
Stored size: 813 Bytes
Contents
## ## @report.body.split("\n\n").map { |ttt| "<p>#{ttt}</p>" }.join ## class Wco::Report include Mongoid::Document include Mongoid::Timestamps include Mongoid::Paranoia include Wco::Utils store_in collection: 'wco_reports' field :title validates :title, presence: true # , uniqueness: true index({ title: 1 }, { unique: true }) def name ; title ; end field :subtitle field :legacy_id, type: String field :slug validates :slug, presence: true, uniqueness: true index({ :slug => 1 }, { :unique => true }) before_validation :set_slug, on: :create field :body field :x, :type => Float field :y, :type => Float field :z, :type => Float belongs_to :author, class_name: 'Wco::Profile' # has_one :image_thumb # has_one :image_hero has_and_belongs_to_many :tags end
Version data entries
35 entries across 35 versions & 1 rubygems