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.
Ruby Podcast Episode 6
Listen to the latest Ruby and Rails related news, checkout the Ruby podcast episode 6.
Case of fragile tests: testing something twice
Having one class use another class’s functionality happens a lot in object oriented programming. That’s called delegation and indeed this is how we make stuff work. Upon testing both classes it’s very easy to test some functionality twice which leads to fragile tests.
Ruby on Rails + MySQL Incorrect string value and key was too long errors
If you have issues in your Ruby on Rails application related to incorrect string values (even if you use UTF8), here’s a short tutorial on how to fix that using MySQL settings tuneup + Ruby on Rails migration
Create a multiplayer Tic Tac Toe game with Rails 5 and Action Cable
How to create a multiplayer Tic Tac Toe game (at least the Action Cable part) with demo and source code. http://cookieshq.co.uk/posts/tic-tac-toe-game-in-rails-5-with-action-cable/
Rails will drop jQuery
ujs will be reimplemented in plain vanilla js https://github.com/rails/rails/issues/25208
Organizing your Ruby On Rails models
Are you frustrated when you look at your models, and everything is all over the place? Get your team to use a uniform organizational style for all your Ruby on Rails models with this simple trick.
Flirting with Crystal, a Rubyist Perspective
I have just started playing around with the awesome Crystal Language. If you’re a Rubyist wanting some extra performance, you may find it here. Check out my review of the language
Thinking Sphinx one model index with two indices
In this short article I describe how to use Sphinx and Thinking Sphinx (v3) in a Ruby on Rails application to index the same ActiveRecord model with separate criterias using two indices. http://teotti.com/thinking-sphinx-search-one-model-with-two-indices-with-static-attributes/
3 pleasantly surprising PostgreSQL Indexing tricks
Greg Navis offers some low-hanging fruit Postgres indexing tips to get the most out of your ActiveRecord queries.
[Screencast] Production Deployment on Ubuntu
A guide to configure your Ubuntu installation and deploy a Ruby on Rails application. Lock down the settings to prevent unwanted access. https://www.driftingruby.com/episodes/production-deployment-on-ubuntu
Trailblazer + Devise: Integrating Devise validatable model with Trailblazer operation
In this blog post I cover integrating Devise validatable model with Trailblazer approach. See how you can propagate your Devise model errors into Trailblazer based forms. Trailblazer + Devise: Integrating Devise validatable model with Trailblazer operation
Ruby (on Rails) ecosystem bittersweet or "we like to hate PHP"
http://stdout.in/en/post/ruby-ecosystem-bittersweet-or-we-like-to-hate-php [more inside]
How to Escape
Escaping gsub’s back-ref enabled replacement strings can be hard sometimes.
You have mastered double-quoted string escapes when you know which byte "\C-\M-A" refers to.
Currency Exchange Rates Gem
BankExchangeRubyAPI is the Ruby API client for the BankExchange service. It provides (historical) exchange rates from central banks from around the world for free.
Why is Rails Preferred among Start-ups?
Well, if you are a company looking to build an application with a fast deployment, Ruby on Rails is a great choice as it combines both speed and efficiency in one package. Check out why Rails is the first choice when it comes to start-ups.
Rails 5 adds OR support in Active Record
The most requested feature in Rails 5. [more inside]
Ruby Refinements
Refinements is a way to limit the scope of a monkey patched class. [more inside]
Using scopes with associations in Rails
Scopes in our models help to DRY up code. In this article, I explore how to use scopes that reference associations.
Add notes to you DB migrations
Have you ever been in a situation where you have to deploy some code and forgot what special things you had to execute manually afterwards? The gem activerecord-migration_notes helps you remember these things at the time you create them instead of searching through PR’s, mail, etc and delay the deploy