Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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 ?

like image 334
Dorian Avatar asked Dec 26 '15 10:12

Dorian


1 Answers

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.

like image 143
Dorian Avatar answered Jan 03 '23 19:01

Dorian