Discover more from Short Ruby Newsletter
Issue #1 - 11 - 17 July 2022
Curated code and ideas shared in the second week of July in Ruby world (mostly on Twitter)
Ruby and Rails code and ideas
Thanks for reading Short Ruby Learnings! Subscribe for free to receive new posts and support my work.
he also shares how to read the source code of a gem:
It is worth reading the thread responses.
He is also sharing another idea about how to use Devise build-in email regex to validate emails in your own model
He received a response from Rafael Franca about using a hook to register a test generator and provided a link to the source where this hook is defined. You should check the whole discussion as it also has some other interesting ideas.
Joel Drapper is sharing some nice code examples about generating static components in the new gem that he is working on Phlex (a new library to create reusable view components). Read the thread as there are some inspiring ideas on how to build chained method calls:
Joel also wrote a good thread about improving the rendering time in views for railsdevs.com. There you will also find a prefetch controller example shared by Julian Rubisch that can be used for prefetching.
Rafal Piekara is explaining in a tweet the difference between .select and .detect in Ruby:
Rob Zolkos recommends executing bin/rails zeitwerk:check in CI environment to check if all classes will load ok:
Shino Kouda is sharing how to use infinity in Ruby:
Interesting projects launched by the community:
Robbie Russell is launching an interesting project in the Ruby on Rails recruitment area:
Thanks for reading Short Ruby Learnings! Subscribe for once per week free curated ideas from Ruby