views:

10

answers:

0

I want to use REST in an Rails application that uses inherited_resources, but I want certain properties not to be revealed during json and xml request.

Let's call that field 'password'.

I know I can overwrite the to_xml and to_json methods and then

super :except => [:password]

But I would have to do that for to_xml and to_json. Not very DRY.

Any ideas?

rest_member_defaults :except => [:password]

in the controller is vaguely what I'm aiming for.

Thanks!