The Ruby and Rails community linklog
Made a library? Written a blog post? Found a useful tutorial? Share it with the Ruby community here or just enjoy what everyone else has found!
Submit a post
Post Preview
Note: Only the first pargraph is shown on the front page and overly long paragraphs may be broken up.
Refactor if condition with Rails scope
Quite often it’s easy to simplify if condition by using a simple scope. Learn how to move logic to model and simplify your if conditions. READ MORE
Ruby on Rails Service Objects and testing in isolation
Service Objects are not a silver bullet but they can take you a long way in modeling your Rails app’s domain logic. In this blog post, I will describe how I usually work with service object pattern in a structured way. I will also cover testing in isolation with mocked services layer. [more inside]
Checking Postgres availability in pure Ruby
Article describes how to communicate with Postgres server without any library. Check it out here.
GraphQLRails - Learn How To Super Charge Your Rails API With GraphQL
I’m excited to share that I’m writing an ebook about building GraphQL powered applications in Ruby On Rails. Please drop your email at GraphQLRails.com and I shall keep you in the loop.
Productive Laziness - optimize your shell workflow with a LazyMe gem
I would like to share a simple productivity tip that probably helped me save thousands of keystrokes so far. [more inside]
Ruby on Rails - easy configuration for you app with YAML files
Did you know that Rails has a built-in method to load configuration defined in yml files? You don’t have to use any external gem to use it in your app. Read more
Ruby 2.6 is at least 2 times faster with new JIT: MJIT
JIT feature has been merged to Ruby 2.6 and here is an introduction to JIT. To install Ruby 2.6 with rvm use following commands:
rvm install 2.6.0-head or rvm install ruby-head
rvm use ruby-2.6-head
Sidekiq 5.1 released
It’s Sidekiq’s 6th birthday and I’ve shipped three releases to celebrate! [more inside]
Ruby on Rails - improve your presence validation on the database level
Usually, when we want to ensure that value for a given column will be always present we would use the presence validator - it’s not enough. You should also validate it on the database level. Learn how
Reduce Rails build time from over 2 hours to 13 minutes
This post is written by a senior par8o engineer about how they reduced build time from over 2 hours to 13 minutes with Semaphore Boosters, fully automated parallel CI for Rails. Read it here
How Fast is Ruby 2.5.0?
Appfolio wrote a blog post as a followup on a previous article on the speed of Ruby 2.5.0, check it out here.
RSpec - make your specs beautiful, extract common test functionality
Since tests are just code, we can refactor it the same way we refactor our application classes. Many times we would need the same piece of code in the different tests so it would be nice to not repeat it over and over again. I want to make my specs beautiful
StimulusJS review
Review and opinion piece on StimulusJS. http://tomkadwill.com/2018/02/06/stimulus-js.html
Microservice Boundaries: 5 characteristics to guide your design
Are your Ruby microservices too small? Too tightly coupled? This design guide can help.
RSpec - by using let and before block you are doing it wrong
Not without a reason before and let blocks were created by RSpec authors but it’s better to avoid them when we don’t really need to use them. I want to know the right way
What Ruby Taught Me?
I’m working with Ruby for 4 weeks now. This is what this language taught me as a developer. [more inside]
A Safer Rails Console
Rails console is great to have in your toolkit, but its power can amplify the effects of mistakes. We discuss strategies for making it safer and built a gem around that. https://www.salsify.com/blog/engineering/a-safer-rails-console
[Screencast] Ruby on Rails - Tips and Tricks
In this episode, we will go through some of the tips and tricks that we often take for granted. We will be looking at nested routes, scopes, migrations and more. https://www.driftingruby.com/episodes/ruby-on-rails-tips-and-tricks