Couple of things here:
1. respond_to is Rails 2 way of doing things, it's more convenient to use 
respond_with in Rails 3
2. If you want to send back xml, then you should ideally be sending in a xml 
request instead on html request

If you want to stick with respond_to call and always render xml from this 
method... then you can use this block:
    respond_to do |format| 
      format.*xml* { render :xml => e } 
    end

Otherwise if you change the request to a xml request instead of normal html 
request, then you can use this:

class ServicesController < ApplicationController  
  respond_to :html, :xml

  def method_name
    s=Service.new 
    s.authenticate('mylogin','mypassword') 
    @cal=Calendar.find(s,{:title=>"Public"}).first 
    @events = @cal.events 
    [email protected] 
    respond_with(e)
  end
end

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/rubyonrails-talk/-/jC1K8J_OUeIJ.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to