Sha256: a93fd2f725fbbc310ee8dcf7a95615298f5684e3c859b3b73b0affea4d493efe
Contents?: true
Size: 315 Bytes
Versions: 33
Compression:
Stored size: 315 Bytes
Contents
module Radiant class Exporter def self.export hash = {} [Radiant::Config, User, Page, PagePart, Snippet, Layout].each do |klass| hash[klass.name.pluralize] = klass.find(:all).inject({}) { |h, record| h[record.id.to_i] = record.attributes; h } end hash.to_yaml end end end
Version data entries
33 entries across 33 versions & 3 rubygems