Some Rails application generates a view with some information displayed about a resource.
I'd like to suppress some of the information through a plugin, without altering nor overriding the view. (A possible way is to rewrite the view in the plugin but this may interfere with other plugins, and I don't want that.)
Is there a way to modify the controller instead, so that the generated view is post-processed before being sent to the client?
Can this be achieved with after_filter
? I try to find an example of after_filter
usage, but the documentation seems low and I can't find a good example.