Skip to content

Instantly share code, notes, and snippets.

@davidlee
Created March 19, 2009 01:31
Show Gist options
  • Save davidlee/81530 to your computer and use it in GitHub Desktop.
Save davidlee/81530 to your computer and use it in GitHub Desktop.
def new
x = Builder::XmlMarkup.new
x.instruct!
x.comment! "User Authentication Successful"
x.user {
x.id @user.id
x.login @user.login
x.name @user.name
}
render :xml => x
end
# <?xml version="1.0" encoding="UTF-8"?><!-- User Authentication Successful --><user><id>1</id><login>dml</login><name>David</name></user><respond_to?:to_xml/><to_xml/>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment