repo.or.cz
/
merb_radiant.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
Renamed helpers to correspond to renamed Controller classes.
[merb_radiant.git]
/
app
/
models
/
radiant
/
.svn
/
text-base
/
exporter.rb.svn-base
blob
e7607a86068dab9a2f616f6f73daaa4d4b76561d
1
module Radiant
2
class Exporter
3
def self.export
4
hash = {}
5
[Radiant::Config, User, Page, PagePart, Snippet, Layout].each do |klass|
6
hash[klass.name.pluralize] = klass.find(:all).inject({}) { |h, record| h[record.id.to_i] = record.attributes; h }
7
end
8
hash.to_yaml
9
end
10
end
11
end