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
Post a Comment