[ad_1]
You can use the include? method of ruby’s Array
if ['trail', 'active'].include?(@subscription.state)
#do something
end
[ad_2]
solved Check if item is included in an array or hash [closed]
[ad_1]
You can use the include? method of ruby’s Array
if ['trail', 'active'].include?(@subscription.state)
#do something
end
[ad_2]
solved Check if item is included in an array or hash [closed]