solnic.eu

Yesterday I stumbled across a talk in which the guy mentioned module sub-classing. I was curious what you can...

github.com

Closure_tree lets your ActiveRecord models act as nodes in a tree data structure. This promises a few improvements over...

api.rubyonrails.org

Instantiating ActiveRecord objects comes expensive. To speed up things, you can choose a more direct way to talk to your...

api.rubyonrails.org

When working with custom transactions and use ActiveRecord::Rollback you may encounter unexpected behaviour if you try to roll back...

You can have a command repeatedly executed and the output displayed. This is useful e.g. for monitoring file system changes...

We often use VCR to stub external APIs. Unfortunately VCR can have problems matching requests to recorded cassettes, and these...

#reverse_order does not work with complex sorting constraints and may even silently create malformed SQL for rails < 5.

davidverhasselt.com

Rails 5 / 6 / 7 Method Uses Default Accessor Saves to Database Runs Validations Runs Callbacks Updates updated_at/updated_on Respects Readonly...

You might get the above error message when cloning certain git repositories (for example the rails repository). It indicates that...

Detect if a gem has been activated A gem is activated if it is either in the current bundle (Gemfile.lock...

github.com

We have released a new library Gemika to help test a gem against multiple versions of Ruby, gem dependencies and...

blog.bigbinary.com

Rails 5 migration classes look like this now: class CreateUsers < ActiveRecord::Migration[5.0] Mind the [5.0] at the end.

api.rubyonrails.org

ActiveSupport::Notifications provides an instrumentation API for Ruby. It is used throughout rails to publish instrumentation events that include information...

You know those helper methods that just render some HTML but look weird because of content_tags all over the...

github.com

We have a new gem Minidusen which extracts Dusen's query parsing and LIKE query functionality. Minidusen can no longer...

github.com

If you were using Dusen for its query parsing and LIKE queries, we recommend to migrate to Minidusen, which extracts...

Capistrano is by default configured to exclude the gems of the groups development and test when deploying to the stages...

You want Spring for super-fast binstubs like bin/rails or bin/rspec which avoid Rails boot time. You want parallel_tests...

makandra dev

Sometimes you might need to nest a git-project inside another git-project. The right strategy is to use submodules...

Angular directives with isolate scopes have three different variable binding strategies, of which one is =. Example: # HTML # Coffeescript @app.directive 'panel...

speakerdeck.com

Presentation about optimizing Ruby on Rails apps. From Nico Hagenburger (homify's lead frontend developer).

To simulate Rails' to_sentence in your JavaScript application, you can use these few lines of CoffeeScript code: joinSentence = (array...

To check the currently running PG version from your Rails application (e.g. Rails console on your production server), simply do...

We're using Middleman for some static sites like our blog. Despite being very similar to Rails, Middleman does not...