Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
Alifatisk
· 2y ago · 0 comments
I don't get the Rails tip for using #squish method. Isn't it the same as #strip?
Comments
[–]
p8
2y ago
Squish also replaces consecutive whitespace with a single space. " foo bar \n \t boo".squish # => "foo bar boo"
https://api.rubyonrails.org/classes/String.html#method-i-squ...