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.
RubyMine 2016.2: Enhanced Support for Ruby, YAML, RSpec, and More
RubyMine 2016.2, the second update in the 2016 series of releases, is now ready to use. RubyMine team has focused on better code intelligence for Ruby, YAML, and RSpec. The 2016.2 also inherited all the new features and improvements from IntelliJ Platform, bringing better support for JavaScript and TypeScript, an enhanced UI, and improved VCS and database tools. Read more…
Advanced SQL in Rails - Part 1
Turbocharge your Rails workflow by taking advantage of advanced SQL, right from within Rails. In Part 1 I cover window functions and views; in Part 2 I’ll discuss how to nicely integrate those into your Rails app. Enjoy! [more inside]
The Minitest Dilemma
If you were to start a new open-source Ruby project today, what testing library would you choose: rspec or minitest? Perhaps you have a strong opinion on this topic and the answer is obvious. For me, it presents a dilemma. Read the post →
Todo list using a Sinatra REST API
I wrote a post showing how to create a simple Sinatra REST API - deployed on Heroku and using ActiveRecord and Postgre. Source code on Github.
Using Rails 5 ActionCable and RethinkDB to build a Reactive WebSocket App
In this article we will demonstrate how to build a WebSockets driven application using Rails 5’s ActionCable. By using RethinkDB’s active changefeeds feature we can eliminate the need for a separate event broadcasting service like Redis, resulting in elegant and succinct code. Read it here!
Update the book 'Learn Ruby on Rails 5'
Help me update the book that is called, “The best Rails book for beginners.” The book is free on Leanpub or Softcover with 5 star reviews on Amazon. Michael Hartl says it is, “geared more toward complete beginners than the Ruby on Rails Tutorial.” I’m offering an Ultimate Rails Learning Bundle for Kickstarter backers. Please, if you can, help with the Kickstarter for ‘Learn Ruby on Rails 5’.
Moving to Gitlab! Yes, it's worth it!
How about cutting down your Repository + CI costs from 4 up to 10 times, and have fun doing it? You will be very surprised to know about how far Gitlab-CE and Gitlab-CI are right now. It’s definitely ready for prime time and you should at least try them. In this post I will do the math for you and explain how to set up a complete auto-scalable CI environment as well.
[Video] Multi-threading in Ruby Explained
How does multi-threading work? What do you need to know? Watch this video to find out :) http://www.blackbytes.info/ruby-threads-video/
Merging Query Strings when Redirecting in Rails
The Rails router provides a convenient redirect method, but it doesn’t include the request query string parameters by default. This post addresses that in a few ways.
How to auto calculate a collection of associated attributes
attribute-depends-calculator The gem will auto calculation and save a collection of depends attributes
Install Rails 5 on Windows
A short and sweet guide to getting Rails 5 running on Windows, with the bare-minimum number of dependencies.
Separation in a Rails monolith: layouts, assets, and controllers
Consider introducing separation in your Ruby on Rails monolith with some simple techniques.
An Introduction to Crystal: Fast as C, Slick as Ruby
Ruby is awesome, but it is not necessarily known for its speed. Sometimes it is not the right tool for demanding applications. Learn about Crystal here.
The Pros and Cons of Ruby Refinements
The purpose of Ruby refinements is to scope changed behavior to a very specific area of code. Here is how to use them, as well as pitfalls to avoid.
Taking control of YAML loading
A deep dive on the unintended consequence of Rails 5 replacing the superclass of ActionController::Parameters and how you can fix similar YAML loading bugs in your apps: https://dev.firmafon.dk/blog/taking-control-of-yaml-loading/
How To Change The Subject Of A Devise Email
This article describes using a custom devise controller to change the subject of your Devise emails in Rails. https://solidfoundationwebdev.com/blog/posts/how-to-change-a-devise-email-subject
Exporting data to a XLSX spreadsheet on Rails
This is a simple tutorial on how to implement a export data to a xlsx (excel) spreadsheet feature on your rails app. Read it here.
Is Phoenix deployment really that hard (compared to Rails)?
I repeatedly hear worries of (mostly Rails) web developers about migrating to Phoenix due to the completely new deployment patterns. How much does the Erlang’s great but unexplored hot code reloading complicate the deployment as we know it? Read more on Phoenix on Rails blog.
Decoding Rails Magic: How Does Calling Class Methods on Mailers Work
Have you ever wondered how it is possible that calling class methods on mailers work in Rails, even though you only define some instance methods in those classes? It seems like it’s quite common question, especially when you see the mailers in action for the first time. Apparently, there is some Ruby “magic” involved here, this article explains what happens under the hood.
Ruby Enumerable, Enumerator, Lazy and domain specific collection objects
Ruby has couple of nifty tricks up its sleeves to deal with collection objects so that they map your domain. In this article we will look on Enumerator, Lazy Enumerator and Enumerable and how to implement API collection objects in Plain Ruby so that they can be used in similar way as Rails scopes [more inside]
Rails Jailed Console
This post walks through monkey-patching the Rails console to default it into sandbox mode in production. It also adds some additional safeguards, like disabling web requests and the Sidekiq interface.
Strategies for Selective Cache Expiration
Selectively expiring cached records is essential to maintaining the health of large production caches. Do you know the right strategy for the job? http://sorentwo.com/2016/08/01/strategies-for-selective-cache-expiration.html