Sha256: 90fea8a0e57cc602acc949d9b7675dab6d2cf316fde237bb9585f0dc04fa74ca
Contents?: true
Size: 567 Bytes
Versions: 22
Compression:
Stored size: 567 Bytes
Contents
class ReaderLayoutsDataset < Dataset::Base uses :reader_sites if defined? Site def load create_layout "Main" create_layout "Other" create_layout "email", :content => %{ <html> <head><title><r:title /></title></head> <body> <p>header</p> <r:content /> <p>footer</p> </body> <html> } end helpers do def create_layout(name, attributes={}) attributes[:site] ||= sites(:test) if Layout.reflect_on_association(:site) create_model :layout, name.symbolize, attributes.update(:name => name) end end end
Version data entries
22 entries across 22 versions & 1 rubygems