
5 days per week, a ruby 💡tip - By @blaked_84
🇫🇷
Joined July 2018
- Tweets81
- Following1
- Followers458
- Likes16
I haven't started posting tips yet, but I'm hiring a Ruby on Rails + Vue.js dev.
French + english speaking
👇
Evalmee.com is hiring a Ruby/Vue.js dev!
🚀 We're building an online exam platform for higher education & professional training, and looking for people who can pick a problem and solve it.
🎓 >4 years of exp
🇫🇷 Paris or full remote
evalmee.welcomekit.co/jobs/d…
Replying to @davygora9
Hey!
I considered a few days ago to restart this account but I have to find a new workflow to find, select and publish tips. The current one is too time-consuming.
Replying to @n_filzi
Hey !
I had to make a longer break than expected, I had too many other projects at the same time.
But I'll will be back this month maybe with a slightly different format 🙂
Replying to @davygora9
Hey !
I had to make a longer break than expected, I had too many other projects at the same time.
But I'll will be back this month 🙂
More examples ⬇️
xitter.cf/daily_ruby_tips/status…
Splat operator and array
💻 Copyable example at: beckr.fr/daily_ruby_tips
Writing large Integers
💻 Copyable example at: beckr.fr/daily_ruby_tips
Replying to @Qew7
@JakubKrzus @QuarkGluant Yes, a separate account seems to be the best way to avoid confusion between the rails and ruby methods. But unfortunately I can't feed 2 accounts with daily tips 😉.
Basically, I was thinking of adding a different tag for Rail tips.
Here documents
📖 Doc: ruby-doc.org/core-2.5.0/doc/…
💻 Copyable example at: beckr.fr/daily_ruby_tips
😱 There is an error in today's tip!
Thanks you @Jauny!
You should read this 👇
Replying to @daily_ruby_tips
shouldn't the return of find e[:a] == 1 be {:a=>1, :b=>2} instead of {:a=>2, :b=>3}?!
Enumerable#find
Do you know you can pass a proc to `find` to return a default value if no object matches?
📖 Doc: ruby-doc.org/core-2.5.1/Enum…
💻 Copyable example at: beckr.fr/daily_ruby_tips
Replying to @Qew7
Thank you for your feedback 🙂
Why do you prefer a different account?
Would you be interested to see Rails tips on @daily_ruby_tips ?
93%Yes
7%No
91 votes • Final resultsEnumerable#partition
📖 Example from ruby-doc: ruby-doc.org/core-2.5.1/Enum…
💻 Copyable example at: beckr.fr/daily_ruby_tips
Replying to @summr00
Oh yes you're right! Copy/paste error 😇
I fixed it on the site.
Thank you 👍
Unescaping text.
Sometime I have to handle escaped text and... no regex tip here. Since ruby 2.5 I use `undump` 😀
📖 Doc: ruby-doc.org/core-2.5.0/Stri…
💻 Copyable example at: beckr.fr/daily_ruby_tips
`split` is not the only solution to split strings.
📖 Doc: ruby-doc.org/core-2.5.0/Stri… & ruby-doc.org/core-2.5.0/Stri…
💻 Copyable example at: beckr.fr/daily_ruby_tips
String#strip
I'm sure you know "strip". What about "strip!", "lstrip" and "rstrip"?
📖 Doc: ruby-doc.org/core-2.5.0/Stri…
💻 Copyable example at: beckr.fr/daily_ruby_tips













