Hi All
I need an solution that i should catch response and based
on some conditions i have to modify response body and send back to
client.
I have tried with a Middleware and got a solution.Can i use a
Middleware or simply one after_filter.
On performance wise which is best.Or is there any other ways to do it.
thanks in advance.
--
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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en.
If you are letting the request go through the Rails stack already I don''t see how you can make the response go any faster either way. If you were catching the request in the middleware on its way to the Rails stack and returned right away without going through Rails then it would be a different story and the response would be faster. On May 31, 4:20 am, Muruga <murugu2...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Hi All > I need an solution that i should catch response and based > on some conditions i have to modify response body and send back to > client. > > I have tried with a Middleware and got a solution.Can i use a > Middleware or simply one after_filter. > On performance wise which is best.Or is there any other ways to do it. > > thanks in advance.-- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Apparently Analagous Threads
- rspec-rails and rack middleware
- Rack Middleware support for Rails 2.0.2? If not what is the alternative to implement similar functionality in Rails 2.0.2..
- How to handle exception that is generated in rack middleware before it reach rails app?
- Rack middleware for shared connection pools?
- Middleware example from Railscast #151 doesn't work as expected. Need help.