Hello there,
I''m new here, and so may not have be aware of any previous discusion on
this particular topic, but the lack of results when googling has led me
to believe there has been none.
Currently, the custom MIME type sytax is as follows:
respond_to do |format|
format.xml do
# ...
end
format.js do
# ...
end
end
What I do not understand is why the following syntax should not be used
instead:
case format
when :xml
# ...
when :js
# ...
end
This would mean defining a #format method that returned the name of the
negotiated content type.
Thoughts?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---