On 4/18/07, Jonas Pfenniger <[EMAIL PROTECTED]> wrote:

Hi Carmen,

to avoid patching Camping, I suggest you look into overriding the
"service" method for the target controllers. You can do this in your
main application module or by including a custom module in your
controllers, as you prefer. Let me know if you need more hints.


I was going to suggest the same thing, but when I looked at it, it wasn't
clear if this would allow for grabbing data like the request headers
(allowing you to determine what form the submitted data takes). Based on the
code Carmen posted, it looks like the idea is to be able to use the same
controllers whether the data comes in from regular requests or as JSON data.
Granted, that could still be done in the controllers, but it does end up
being a bit less elegant.

--
Thomas Lockney | [EMAIL PROTECTED] | http://opposable-thumbs.net
_______________________________________________
Camping-list mailing list
Camping-list@rubyforge.org
http://rubyforge.org/mailman/listinfo/camping-list

Reply via email to