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.
Rails: make sure you have proper DB indexes for your model’s unique validations
An article shows 2 solutions how Rails model’s unique validations should be implemented to save performance https://medium.com/@igorkhomenko/rails-make-sure-you-have-proper-db-indexes-for-your-models-unique-validations-ffd0364df26f
Lessons learned from using Capybara for feature testing
I’ve compiled a list of techniques learned while writing feature tests in Capybara. Read the full article here.
Ruby gem to have automatic scopes for ActiveRecord models
I use these modules in most of my projects to have useful scopes based on columns’ types (dates, times, strings and numerics). I finally took the time to extract it into a fully reusable gem :) https://github.com/BaseSecrete/type_scopes
Top 15 Ruby on Rails web applications
Most famous web applications written with RoR towards the web domination!
Dockerize and Deploy to AWS EC2 your rails app
Folks, a few weeks ago I dockerized and deployed my rails application to AWS. I hope that it be useful to someone. [more inside]
Use DidYouMean in your own code
DidYouMean, bundled with recent Ruby versions, does pretty error messages with suggestions, like undefined method 'cover' for 1..10:Range. Did you mean? cover?. If you want to implement the same functionality for your own entities (some tags, lexemes or metaprogrammed things), you will probably find this small wrapper gem useful.
How to use Elm Components in a Rails Application
Let’s see how simple it is to use Elm components in our Rails 5.1 application
Do Turbolinks apps still need SJR?
With Turbolinks handling so much out-of-the-box, do SJR templates (js.erb) have any role to play in a modern Rails app? Has SJR been replaced by Turbolinks? This article discusses the answer
Forget conditionals, use the Rail way
Most of the time, with growing uncertainty, code goes rightwards. Nested conditions are difficult to read and error prone. The real intent is to check success/failure path, so why not make it clear?
Fighting for Open Source Sustainability: Introducing Code Sponsor
tl;dr: Two-thirds of the top OSS projects are maintained by one or two people. This is not sustainable. We can help. [more inside]
[Screencast] Single Table Inheritance
Learn to use single table inheritance to allow multiple classes to be stored in the same database table. https://www.driftingruby.com/episodes/single-table-inheritance
7 Successful Stories From Ruby On Rails Web Development
Ruby is a programming language while Rails is the web application framework that implements it. Developed by Yukihiro Matsumoto, Ruby on Rails has found utility in some of the coolest and widely known projects worldwide. Here are few that catch the limelight. 7 Successful Stories From Ruby On Rails Web Development
15 Things To Do With Ruby Awesomeness
Once upon a time, there was a super fun to write programming language called Ruby…
Rails on Docker: Using Docker Compose with Your Ruby on Rails Apps
Learn to use Docker Compose to configure and manage Docker containers for your Rails apps: [more inside]
The 11-minute guide to building an online store with Rails and Stripe Checkout
Learn to build and launch a real online store in this 11-minute video tutorial. We will build a simple store which accepts payments through Stripe checkout.js and deploy it to Heroku.
Crowd funding for I Love Ruby has been launched
Crowd funding for 2018 for I Love Ruby (a free programming book) has been launched. To know more visit https://mindaslab.github.io/I-Love-Ruby/
kramdown 1.15.0 released
This is a bug fix release but also drops compatibility with Ruby versions < 2.0. See https://kramdown.gettalong.org/news.html for details.
Transferring your color theme between Sublime and Atom
Davinci is a gem that ports color themes between different text editors. Did you modify your Monokai and you’re too lazy to figure out how to make the same changes in Atom? Just use davinci! https://github.com/mattcheah/davinci [more inside]
Docker images to get started with APIQ CMS
Recently I spent some time on preparing Docker images containing boilerplate Ruby on Rails 5.1 apps packaged with APIQ as dependency… Continue reading
London Ruby Unconference 2017 on Oct 07
If you are in London, and love Ruby, come join us in this year’s edition! An ‘unconference’ is a gathering which aims to provide an open and creative conversation on a series of topics. It is unlike a normal conference in that there is no pre-planned agenda, no central organisation, no fixed speakers, and no eye-watering price tag! Details and Tickets here.
A Puzzle About Ruby Constants
While doing some refactoring, I stumbled on a case where Ruby constants didn’t behave as I expected. To figure out what was going on, I ended up drilling down into YARV instructions. It turns out that Ruby constant resolution is actually very complex! BLOG POST HERE
How I wrote a big and nasty query and how I started simplifying it
A blog post about a time I wrote a query with chained ruby methods weighing in at 41 lines and 2844 characters and how I started to clean it up.