Sha256: 3246510e2b9e96a72876bcfd76f8acb954666fa276701122cd06a92237e83753
Contents?: true
Size: 362 Bytes
Versions: 1
Compression:
Stored size: 362 Bytes
Contents
require 'acts_as_page/seo' module ActsAsPage extend ActiveSupport::Concern included do include Mongoid::Orderable include Mongoid::Slug field :name embeds_one :seo, class_name: 'ActsAsPage::Seo', as: :page accepts_nested_attributes_for :seo after_initialize do |o| o.build_seo(title: name) if o.seo.nil? end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
mongoid_acts_as_page-0.5.1 | lib/acts_as_page.rb |