Prefer %w to [] when you need an array of strings
# bad
STATES = ['draft', 'open', 'closed']
# good
STATES = %w(draft open closed)
Written by Said A
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Ruby
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#