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.
Rack Middleware
Recently I tried to explain how Rack middleware works to a friend and I ended writing this small post on how to add two simple middleware to a Rack application. I hope it’s useful!
Table output generation with tty-table
With tty-table you can create tables to render back to terminal, CSV or any output you fancy. With custom renderers you can style your tables the way you like it. Give it a try and let me know what you think!
cfp for euruko, eurucamp and jrubyconf eu are open
The cfp for euruko, eurucamp and jrubyconf eu have been opened! [more inside]
Better Feedback on Keyword Argument Errors
After tripping over myself for a simple mistake while using keyword arguments, I think we could improve feedback in ArgumentError to help people recover from such mistakes more easily. [more inside]
Understanding the Resque internals – Resque::DirtyExit unveiled
Recently I had to debug Resque jobs failing because of a mysterious Resque::DirtyExit error. The documentation online is not helpful so I thought about sharing what I discovered here. [more inside]
RSpec Subject, Helpers, Hooks and Exception Handling
The first step in learning RSpec is to understand the basic structure of the describe / context + it flow. The next step is to learn the most common helpers to effectively structure your specs. Read the tutorial.
Irbtools 2.0
The IRB tools make using IRB more productive since 2010. [more inside]
Marking records as deleted without removing the data in rails
Do you really need to delete data from you database? Or is there a better way?
New Template Engine for Ruby
Hi, inspired by Mote, I’ve built a template engine for Ruby, is minimalist and simple to use, it’s called Ate, hope you enjoy it! Also, is a good way to learn how templates engines are built looking to the source.
How to use Greg's Event Store from ruby
We experiment with Event Sourcing and Greg’s Event Store in our projects. We decided to create http connector to Greg’s tool. More here.
Refactoring - when?
This is the last part of the blog post series about refactoring, explaining when to do code refactoring. The other two posts describe how to do refactoring and… why do it in the first place. Enjoy! [more inside]
How to validate the uniqueness of an attribute across multiple models in Rails
I recently ran into the situation where I had to validate an attribute across multiple models. It can be beautifully solved with a ActiveSupport Concern and I blogged about it today. Check it out and let me know what you think in the comments!
PolyBelongsTo gem hits Version 0.2 !
Simplify ActiveRecord access by using uniform methods for all kinds of relationships. Also includes hierarchy helpers.
Conventional Changelog Ruby
Ruby lib and executable to generate a conventional changelog [more inside]
Ruby in Production: Lessons Learned
Having deployed a variety of Ruby apps (Rails and non-Rails) over the course of many years, here are some lessons I’ve learned to keep things afloat, along with Ansible and Docker recipes.
Ruby Push Notifications
Hey there guys. Anyone using Ruby to send iOS and/or Android Push notifications? Having any issues. Try this gem and let me know your thoughts please!
Customize Devise to support Multitenancy authentication
I created a blog to talk about how to customise Devise to support Multi-tenancy authentication. Enjoy!
Interrobang
Interrobang: convert your predicate_methods? into bang_methods! without abusing method_missing. There’s also a nifty aside in the README about testing rescue handlers. Also, did you know that method? and method! were lifted from Scheme?
Verse 0.4.0 release
In this version of verse you can truncate, wrap, pad and align content with ANSI codes. Enjoy!
Code examples of Ruby Patterns
Here https://github.com/TheBlasfem/ruby-patterns i’m sharing examples about ruby patterns, learned following the course https://code.tutsplus.com/courses/design-patterns-in-ruby
Composable validations
TL;DR: In this post I will try to show why understanding multiple programming paradigms is useful and important (and also fun!). This post tackles the common problem of aggregating validation results in a comprehensible return value. The problem we solve here is almost the same as the one solved by ActiveRecord’s errors. [more inside]
Learn about the Caesar cipher
Want to learn how to write your very own Caesar cipher encoder? Have a read :)
How to display the source of a Ruby method
You might know this feature from pry, but know it is also available outside pry via the code gem.
Work Flow and Making Progress
Points I’ve learned about getting things done with programming.
Making Big Changes Safely
I’d like to take you back 12 months ago. My story starts with my team beginning a 3-month project to add a new feature. My team is Task Force 1. We have 4 developers. The feature is called “Custom Inventory Statuses.” Read more