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.
ETag caching gotcha in Roda + Nginx
Why ETag caching might work on your development machine but not in production in Roda application using Nginx as web server. http://masa331.github.io/2016/01/06/roda-etag-caching-gotcha.html
Photish - A simple photo collection website generator
Photish is a simple, convention based (but configurable) static photo site generator. https://github.com/henrylawson/photish
4 ways to filter has_many associations
Filtering has_many associations can be one of those problems which makes you want to do some extra reading to brush up on your SQL and ActiveRecord knowledge. http://ducktypelabs.com/four-ways-to-filter-has_many-associations/
Spina CMS - New update
It’s been a while since our last update. We’ve been working on some exciting stuff and I would like to show it to you. [more inside]
What's up with queues? Ruby + Redis
Just a simple primer on the basics of queueing. Feel free to suggest improvements and provide feedback! https://medium.com/when-code-explodes/what-s-up-with-queues-ruby-redis-c05311f33438#.lrng41qd2
Contextual validations with form objects
When you deal with complex forms The Rails Way is not enough. You have to introduce another abstraction for handling more sophisticated validations. http://blog.sundaycoding.com/blog/2016/01/08/contextual-validations-with-form-objects/
Is Rails 5 Ready? - Check the Status of Rails 5
A simple page that shows the status of the Rails milestones. http://solidfoundationwebdev.com/is_it_ready/rails
Hidden Complexity in Ruby Land
Ruby makes it easy to pack a lot of power into a few lines of code. [more inside]
All (new-ish) Rails security HTTP headers explained
Rails sends a couple of security HTTP headers by default, so you should probably know what they do. There are also a few additional ones that require a bit more configuration and thought. You can read the article here.
How Delete The First Instance Of Value From Array In Ruby
This article describes deleting the first instance of a value from an array in Ruby. http://solidfoundationwebdev.com/blog/posts/delete-the-first-instance-of-value-from-array-in-ruby
The difference between if and unless
A dive into what is happening under the hood between if and unless: Ruby’s “unless X” is processed differently than “if !X”!
Statefulness in a Stateless Language: Elixir
When it’s necessary to keep track of state, Elixir (functional, stateless) has got your back by using recursion and processes. You can read Micah Woods’ article here.
ActiveRecord stole my data and now I want it back
A case study from the Yammer engineering team describing how they migrated away from an ActiveRecord model to a plain Ruby class backed by a microservice. A practical demonstration of how to evolve an architecture, with plenty of code examples and suggested gems.
How to extract data from HTML with Ruby
How to extract data from HTML with Ruby. A guide showing you how to parse and extract data from HTML documents with Ruby.
Refactoring rails controllers the right way
“Rails developers will often live by the mantra “Skinny Controller, Fat Model” when writing Rails controller code. However, the name of the pattern is misleading and reinforces the noxious idea that any class should be “fat”.” [more inside]
Simple error monitoring in Ruby on Rails
Learn how to add free error monitoring to your Rails apps with exception_notification gem. You’ll also need an email service.
Idempotent seed files
A blog post on how to make your Rails seed files more reusable by making them idempotent
[Book Review] Clean Code Book of Robert C. Martin Series
Clean Code is a awesome book which every Software Engineer needs to read. Read more. Hope this article is useful for you.
New tty-color module
A small module tty-color for detecting terminal color capabilities.
Lotus Framework needs legal advice
There is a potential problem with Lotus’ naming. The author is looking for (free) legal advice. Any help is appreciated. Source: Tweet [more inside]
Lessons Learned from Building a Ruby Gem API
I wrote a new article on things I learned while building a Ruby Gem API. Hope you enjoy!
Useful RSpec matchers that you may not be using
Just sharing a couple RSpec matchers that I think are very useful but people doesn’t seem to know they even exist: Useful RSpec matchers that you may not be using
Object#tap: a better use.
My opinion of the typical use of Object#tap, it’s original intended use, and a couple more handy uses too. http://redningja.com/dev/rubys-object-tap-a-better-use/