I think that :replace => true will cure your ills
response_for :index, :replace => true, :types => [:html]
Or, if you want to change the behavior globally, then make a new
Actions module for rc with different response_for blocks
Cheers,
ian
--
Argument from Design--We build web applications
Western House 239 Western Road Sheffield S10 1LE UK
Mobile: +44 (0)797 4678409 | Office: +44 (0)114 2667712
<http://www.ardes.com/> | <http://blog.ardes.com/ian>
Let's say your app does things a little different to the default rails
scaffold (with rc actions is based on) across the board. For example,
lets say you dont want xml at all. You already know that you can pass
the :actions key, but what if you just want to get rid of the xml
response once and for all?
What I would do is look at the modules in
ardes/resources_controller/actions and .../singleton_actions, chuck
these in your lib/my/actions (or whatever) making your changes
In an initializer, you can then do this:
Ardes::ResourcesController.actions = My::Actions
Ardes::ResourcesController.singleton_actions =My::SingletonActions
And the action module that RC uses by default will be set
Ah, see where you're coming from - if you don;t do anything you might
not notice some attributes leaking out in xml.
So, your suggestion is:
* remove the xml stuff from resources_controller actions
* have an option to include the standard xml stuff for REST
Any thoughts anyone?
Cheers,
Ian