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

c++ - Difference between pre and post decrement in recursive function argument -

php - Nothing but 'run(); ' when browsing to my local project, how do I fix this? -

php - How can I echo out this array? -