Is there any difference between in? function between rails 3 and rails 4? -


when migrated rails 4.2 rails 3.2, getting error saying, wrong number of arguments 2 1.

yes,
in rails 3, array.in? can write this

'a'.in?('a','b','c','d') => true 

but in rails 4, accepts 1 argument.
either, 'a'.in?('a')
or, 'a'.in?(['a','b','c','d']) otherwise, throws exception


Comments

Popular posts from this blog

smartface.io - Proper way to change color scheme for whole application -

Email notification in google apps script -

javascript - three.js lot of meshes optimization -