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 hash initializing – why do you think you have a hash, but you have an array
We all use hashes and it seems, that there’s nothing special about them. They are as dictionaries in Python, or any other similar structures available for multiple different languages. And that’s more or less true. Although Ruby hashes are really special, because from time to time they really are… arrays. You can read more about that here.
A Simple Way To Increase The Performance Of Your Rails App
There are many way to increase the performance and code your rails application , it is a vast topic and subjective to the application your are development will be discussing small changes that can be done, which will change performance and improve it.
Separating Abilities in CanCan
In this post Separating Abilities in CanCan, Jordan has a look at an example Ability file and enumerates some flaws in such a system. Following that he discusses a way to improve it by breaking the Ability file out into multiple Ability files.
Object hierarchies in Ruby
In this article I go over the basics of the Ruby object ancestor chain and also cover the default parent objects: Object, Kernel, and BasicObject.
How much testing is too much?
It’s painful to work with badly tested code. But when you just wrote what seems like 200 tests to ship one tiny feature, those days before you knew about testing and TDD seem better and better. There must be a middle ground. So how much testing is the right amount?
Gosu and Chingu together to build a game
Gosu, a game development library for Ruby, and Chingu, a layer written in the top of Gosu, make the development of games easy in Ruby, check this Megaman game if you want look a real example of Gosu and Chingu working together.
Metaprogramming Dynamic Methods: Using Public_send
Metaprogramming is super cool, but it’s also super tough to learn when you’re first starting out. This blog post takes a look at metaprogramming through dynamic method calls, and explains and implements the public_send method in a real-life example of code abstraction.
Lotus and Microservices
Lotus default architecture is designed for quick dev iterations and easy microservices extraction.
What's new in Rails 5
Check out these new features available in Rails 5
Build a Calendar with (Functional) Ruby
In the start of a multi-part series, we will build a calendar library to later be rendered, styled, and then acted upon via coffeescript to create appointments, all while keeping our Ruby immutable and functional! Read more
Object-to-Object Transformations with Representable
The new Representable 1.2.6 release allows you to directly transform objects to objects, making it simple and fast to map deeply nested object graphs to your desired format. My 3-minutes blog post explains how.
RailsConf 2015 talks that you should watch
Over the weekend I watched a lot of talks from RailsConf 2015 and these are my favourites (so far). You can check them out here.
Idiosyncratic Ruby: Episode 1-4
Idiosyncratic Ruby is a new resource about weird stuff in Ruby. There will be a new blog post every day in May! The first days covered the following:
Best Ruby resources worth following.
Offline over the weekend? Read more
Integrate Rubocop in your workflow
Let Rubocop help you to enforce your styleguide:
time_boots.gem - simple time steps
I’ve recently published the gem for tasks like “round time to edge of day”, “advance time by 4 weeks”, “generate ‘each hour’ sequence” and so on. Small, no dependencies, no monkey-patching.
When APIs Change - A story of a rubygem, tests, and vcr
When APIs change you have to deal with it. In this episode of rubycasts.io we will see that scenario, how to fix it, and how to test for it. We will also discuss fast tests vs slow tests and using VCR to records conversations with remote resources. Read more
pluck_to_hash gem
A simple gem, adds pluck_to_hash method to ActiveRecord.. returns hash instead of array
Awesome ActiveRecord (Goodies, Libraries, Tools, Extensions, Guides, etc.) List
Hello, I’ve started yet another awesome collection on GitHub over at the Planet Ruby. What’s news? The awesome-activerecord repo collects ActiveRecord goodies, libraries, tools, extensions, guides, etc. Anything missing? Contributions welcome. Cheers.
Private Module Methods in Ruby
After years of not finding this solution; it turns out it’s really quite simple.
Having fun with opal and sprockets
Blog post about setting up an environment to play with opal.
Mutant and CI
Mutation testing is another form of checking the test coverage. As such it makes sense to put it as part of our Continuous Delivery process. In this blog post I’ll show you how we started using mutant together with TravisCI in the RailsEventStore project.
Ruby, recursion and AI
Find out all possible chess knights movements using minimax algorithm:
Ruby on Rails Podcast 189: @dhh RailsConf 2015 Keynote Discussion
Eric Steele joins Sean Devine to discuss @dhh’s RailsConf 2015 keynote on episode 189 of the Ruby on Rails Podcast on 5by5.
[CODE & TUTORIAL] How to build an SMS Voting System with Rails, Sinch & Chartist
Full code and tutorial. Build a simple SMS voting system that you can use at events, meetups, and more. Uses Sinch SMS to receive responses, Ruby for the backend, and Chartist to display the results as a nice looking graph. Try the tutorial here.