Skip to content

Instantly share code, notes, and snippets.

@kris
Created June 18, 2009 17:59
Show Gist options
  • Save kris/132064 to your computer and use it in GitHub Desktop.
Save kris/132064 to your computer and use it in GitHub Desktop.
def to_xml(options = {}, &block)
thumbs = Proc.new do |opts|
[:large, :thumb, :icon].each do |style|
opts[:builder].tag!("thumbnail-#{style}", self.photo.url(style, false))
end
end
default_options = {
:procs => [thumbs],
:except => [:photo_file_name, :photo_file_size, :photo_content_type, :photo_updated_at]
}
super(default_options.merge(options), &block)
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment