Skip to content

Instantly share code, notes, and snippets.

@markbates
Created August 22, 2008 20:57
Show Gist options
  • Save markbates/6851 to your computer and use it in GitHub Desktop.
Save markbates/6851 to your computer and use it in GitHub Desktop.
class UsersController
include Mack::Controller
def show
@user = User.get(params[:id])
wants(:xml) do
render(:text, @user.to_xml)
end
wants(:html) do
# do some more work to set up the view...
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment