Getting rid of DEPRECATION WARNING: env is deprecated and will be removed from Rails 5.0.
问题 While migrating to Rails 5.0.0.beta1 I discovered lots of deprecation warning : DEPRECATION WARNING: env is deprecated and will be removed from Rails 5.0. (called from XXX at YYY) I've tried to get rid of that and try to find an alternative but found nothing in the actionpack changelog. Any ideas ? 回答1: ok, so it seems that env method has been deprecated in ActionPack by this commit. so from now on we should user request.env instead of env in our controllers and helpers. 来源: https:/