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

Version Path
radiantcms-couchrest_model-0.2.4 app/models/radiant/exporter.rb
radiantcms-couchrest_model-0.2.2 app/models/radiant/exporter.rb
radiantcms-couchrest_model-0.2.1 app/models/radiant/exporter.rb
radiantcms-couchrest_model-0.2 app/models/radiant/exporter.rb
radiantcms-couchrest_model-0.1.9 app/models/radiant/exporter.rb
radiantcms-couchrest_model-0.1.8 app/models/radiant/exporter.rb
radiantcms-couchrest_model-0.1.7 app/models/radiant/exporter.rb
radiantcms-couchrest_model-0.1.6 app/models/radiant/exporter.rb
radiantcms-couchrest_model-0.1.5 app/models/radiant/exporter.rb
radiantcms-couchrest_model-0.1.4 app/models/radiant/exporter.rb
radiant-0.7.2 app/models/radiant/exporter.rb
radiant-0.9.1 app/models/radiant/exporter.rb
radiant-0.8.2 app/models/radiant/exporter.rb
radiant-0.9.0.rc2 app/models/radiant/exporter.rb
radiant-rc-0.9.0 app/models/radiant/exporter.rb
radiant-0.8.1 app/models/radiant/exporter.rb
radiant-0.5.1 app/models/radiant/exporter.rb
radiant-0.5.0 app/models/radiant/exporter.rb
radiant-0.6.0 app/models/radiant/exporter.rb
radiant-0.5.2 app/models/radiant/exporter.rb