Skip to main content
5 events
when toggle format what by license comment
Jan 5, 2015 at 23:50 history edited Dan Kohn CC BY-SA 3.0
Fixed bugs based on comments
Jan 5, 2015 at 22:03 comment added tokland string.split(',') returns an array, which is never falsy in Ruby, so || [] will be never reached. As 200_success says, you have to do the or before the split.
Jan 5, 2015 at 6:25 comment added 200_success Changing rescue to || makes the function crash if params[:filter] is nil. However, (params[:filter] || '').split(',') could work.
Jan 4, 2015 at 22:16 history migrated from stackoverflow.com (revisions)
Jan 2, 2015 at 1:01 history answered Dan Kohn CC BY-SA 3.0