Beefing up remove_attribute controller action for support with JSON