Sha256: 8796cafb90d1c401918a4b1c11f5f65385d9cbee006ecc82648951efb474347c
Contents?: true
Size: 495 Bytes
Versions: 16
Compression:
Stored size: 495 Bytes
Contents
module Kitsune module Page def self.included(model) model.class_eval do admin do wysiwyg :body select :layout, Proc.new {Dir.glob(File.join(RAILS_ROOT, 'app', 'views', 'layouts', '*.html.haml')).map{|f| File.basename(f).split('.').first}} end before_save :update_url belongs_to :page, :foreign_key => "parent_id" def update_url write_attribute :url, title end end end end end
Version data entries
16 entries across 16 versions & 1 rubygems