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.
The pitch for mruby
In this post we’ll learn about what mruby is, where it fits, and why I believe it will play a big role in the future of Ruby. [read more]
A gem for rescuing unique constraints
The team at Reverb put together a tiny gem that rescues unique constraint failures on the model and turns them into regular model errors. Download the gem, or read more.
Paperclip Apply Processor If Condition
How to only apply processors if a condition is met in Ruby with the Paperclip Gem. http://solidfoundationwebdev.com/blog/posts/paperclip-apply-processor-if-condition
JSON formatted logger
Mostly to be able to analyze them, I’m having all my logs written in JSON format. [more inside]
Sharing code in FactoryGirl
Sharing code between factories in FactoryGirl takes a little bit of effort. Here’s one way of accomplishing it, which I patched together.
Upload image to S3 using Carrierwave on Rails 4
In this artile, I’ll show you step by step how to upload image to S3 using Carrierwave on Rails. http://goo.gl/H1pSNR
Rack::JSONP::Utils
These two little middlewares will help you to support JSONP in your Rails API app. One of them will transform your response body into the callback text expected by your JSONP javascript request. The other will overwrite the request method of your Rails app. [more inside]
Ruby Time Classes
https://www.youtube.com/watch?v=mRu8guNMz2A
Stay Static - Static Site Builder / Generator Showcase + Samples (Jekyll 'n' Friends)
Inspired by the TodoMVC showcase I’ve started to put together a static site builder / generator showcase named Stay Static. The idea is to helping you find your static site builder / generator that works best for you. The first two live static site samples include Jekyll (Ruby) and Hugo (Go). The standard sample showcases 1) pages 2) post and 3) custom content types (e.g. bookmarks ‘n’ links). Is your static site builder / generator missing? New sample static sites welcome. Cheers.
What is Memcached?
A gentle introduction using Ruby http://davidmles.com/blog/what-is-memcached/
How to save time writing model tests with shoulda matchers
Perfect for beginners, this post shows you how to save time writing tests for your Rails models using shoulda matchers.
Outside-In Testing for Ember Apps
Outside-in testing allows the code to guide us through the testing process. We don’t decide beforehand how many tests to write, or what exactly to test. Article here.
Refactoring in Ruby: The right place for a Builder?
In this blog post I cover how to refactor a simple code smell using the Builder Pattern by example. Also, I show another situation where applying the Builder Pattern comes handy. Check it out here.
Debugging SystemStackError
Below Ruby 2.2, debugging stack overflow errors can be painful because the backtrace is swallowed. Learn a quick workaround with Ruby method tracing. https://rossta.net/blog/debugging-systemstackerror.html
101 Ruby Code Factoids
Whomever you may be; you will learn something new about Ruby. http://6ftdan.com/allyourdev/2016/01/13/101-ruby-code-factoids/
Configurate ENV with Ruby syntax
Build-in uploader to Heroku. https://github.com/SergXIIIth/config_env
Chromebook for Ruby on Rails developers
You don’t need expensive laptop to be a web-developer or sys-admin guy, all you need is an attitude to get things done. In this article I’ll give you my experience on developing commercial web-application backend via chromebook http://www.eq8.eu/blogs/18-chromebook-for-web-developers
How to find out if a name is reserved in Rails 4.2.5
You can use the rails console to programmatically find out if a given name is reserved in Rails 4.2.5. Read more about it here: How to find out if a name is reserved in Rails 4.2.5
Improvements to error responses in Rails 5 API mode
I wrote an article that presents some improvements to error responses in Rails 5, specially focused on its new API mode.