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 5 adds helpers method in controllers to ease usage of helper modules
Controllers can access helper methods in Rails 5. More Details
Essential & Useful Ruby Gems for Rails 4
Ruby gems makes development much easier. They are packaging systems designed to facilitate the creation and distribution of Ruby programs and libraries. Check out some of the best Ruby on Rails gems for Rails 4.
Observers in Rails
Let’s say you need to listen to changes in a model’s attributes and trigger some events based on those changes. If you look at the following example, I’ve done exactly that. If the status of the application is changed an email is sent. [more inside]
IMPLEMENTING UPSERT IN RAILS
An upsert is update or insert. Upsert in database terms refers to an operation which should insert a row into a database table if it doesn’t not already exist, or update it if it does. One can implement this function in Rails by writing anActiveRecordExtension. This will allow you to call the upsert method on any model. [more inside]
Journeta Engine updated for Ruby 2.3.1!
Journeta is the simplest, most flexible gem for finding Ruby processes on the local network, allowing event-based exchange of arbitrary data with ZERO configuration. Peer management is managed automatically by the engine. Today’s v1.1.0 release comes after a two-year hiatus, and adds first-class support for v2.3.x of the default Ruby interpreter (MRI) in addition to bug fixes and sample code. Journey is free software from Lee Does.
New tty-progressbar fixes rate measurements.
tty-progressbar v0.10.0 fixes rate measurements for :rate, :mean_rate, :byte_rate and :mean_byte formatting tokens.
Why is a BasicObject a Range?
Recently I came across a Ruby bug that manifested itself in some interesting behavior around BasicObject and Range; enjoy the debugging notes!
NPM integration for Rails
https://github.com/endenwer/npm-rails This gem made it easy to bring NPM to Rails. Under hood it use Browserify. Just like Bundler but for NPM packages.
RAILS I18N AND ELEGANT MESSAGE PASSING TO JAVASCRIPT
Internationalization is the process of abstracting all strings out of your application. Rails provides excellent support for Internationalization. [more inside]
A sample Ruby script to achieve fast incremental back-up on btrfs partition
In this article I describe a simple strategy to achieve incremental back-ups quickly and explain a sample Ruby script that implements it.
Clear Intentions: Do you speak 3?
It’s easy to mistake current knowledge for universal knowledge. Decisions that were straightforward a year ago are a mystery today. We’ve all done it. Why did I pick that value? What made them do it that way? One way to mitigate this is to make your code clarify your intent. [more inside]
API of the future
In this short blogpost I describe what ‘future’ solutions exists when it comes to building your APIs. I also evaluate whether they’re possible to implement today, with Rails.
Cucumber tools for Real Life
Do you use Cucumber to solve your many QA/testing needs? Are you one of the lucky ones who knows how to use it as it was meant to be used? Are you one of the unlucky ones who works on a team that uses it in a way that would make its creators cry? If you answered 'yes' to any of those questions, then I've got a toolbox for you! [more inside]
10 benefits of Code Review for the win
I have just shared my ideas about 10 benefits of Code Review for the win [more inside]
Top sites built with Ruby on Rails
Ruby in Rails has graduated from being a simple framework to a powerful tool in its own right. Its popularity has soared in recent years and for good reason; it offers stable performance and takes very little time to develop powerful applications making use of gems. [more inside]
How to share session between Rails 4 applications?
Have you ever need to share session between two rails applications? [more inside]
THE 15 BEST GEMS FOR RUBY ON RAILS WEB APPLICATIONS
Ruby is a breakthrough in allowing web development as one can make use of Gems to fill in functionalities. This allows one to build a web app in matter of days which would usually take months to develop. Gems are highly modular and perform a specific function, which makes integrating them into new applications extremely easy. Out of the multitudes of gems created by the Ruby community at large for use, we pick fifteen which, in our opinion, are the recommend ones that should be present in every web application. [more inside]
Splitting Monolithic Rails Application to Microservices
If you are facing a monolith application which has become unmaintainable and difficult to deploy, you need to know some ways to manage it. If your team has to go through thousands of lines in order to understand the project and to make some changes, it is time to split them. Read More!
Upgrade Rspec 2 to Rspec 3
This is a very detailed information about upgrading from Rspec 2 to Rspec 3. After finished the upgrade, it seems quite easy. Bump the version, fix old syntax. Actually it’s not that easy as I thought originally. It traps me several times, I’m putting it here, other guys can refer to. I didn’t quite follow the official guide. Instead, I directly go to 3 from 2.
The Power of ActiveRecord's '#update'
We all strive to keep our controllers skinny. The first sign of a fattening controller is commonly in the update action. However, if we understand rails and the power of the update method, we can keep this action looking like it was just generated.
Making Rails asset pipeline faster
We all know that for a rather large Rails app where the front-end is quite stuffed, the asset precompilation and more importantly - development mode changes are far from instantaneous - article on how to alleviate that
Behavior changes in Ruby 2.4
Ruby 2.4.preview1 was recently released, so I wrote an article describing some behavior changes.
Parallel processing in ruby
Parallelization is a powerful concept. It can speedup execution n-fold. A lot of processes are inherently concurrent. Such processes have to be identified and exploited. [more inside]