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.
Introducing Godmin 1.0
Godmin is an admin framework for Rails 4+. It helps you build dedicated admin sections for your apps, or stand alone admin apps such as internal tools. It has support for common features such as scoping, filtering and performing batch actions on your models. Read more in our blog post
Debugging Capybara: screenshot of error page on CircleCI
It’s crucial, to have a screenshot with failed integration spec on CI, and it turned out to be dead simple with CircleCI. Check out how in the blog post.
Changing from an embedded document to a relationship with Rails and Mongoid
Recently had to deal with moving an embedded document on MongoDB to a relationship between two models under Rails. I wrote up a step-by-step procedure that can be adapted according to your needs. Check it out on the blog post at CookiesHQ
Ruby 2.3.0 preview 1
Ruby 2.3.0 preview 1 was announced and, as usual it includes plenty of improvements and new features. Read more
Notable features in Ruby 2.3.0-preview1 explained
If official announcement is too short for you, read extended version with a bit of a humour in it.
Bulletproof Rails Background Jobs
As Rails applications have grown and matured, we’ve asked them to do more complete and weighty tasks, and background jobs have been a necessity to keep the web application side of things responsive and zippy. But in a lot of cases, developers simply dump code into workers and call it a day. Just by following a few common-sense patterns, you can keep the back side of your code as neat and well-ordered as the front.
Get Sentimental About SMS with Twilio, Bluemix and AlchemyAPI
IBM’s Bluemix platform is home to an ever growing number of cognitive computing services that, as developers, we can use in our applications to learn more about our data. We look at how to get a Ruby application set up with Bluemix and use the AlchemyAPI and Twilio to respond to SMS messages based on sentiment.
5 Best Ruby on Rails Content Management Systems (CMS)
Content Management System is also a great platform for content organization, from drafting, revising, reviewing, approvals and publishing. With CMS, users can neatly divided into roles from authors, editors and publishers, and SEO editors. Read our blog to know about RoR based content management system.
Jekyll Against the Rest of the World - Dynamic is Evil ;-) by Tobias Horvath
Hello, via Vienna.html - (a static site news feed + user group) - the latest article about Ruby’s (and the world’s) #1 static site builder/compiler/generator titled “Jekyll Against the Rest of the World - Dynamic is Evil ;-)” by Tobias Horvath. Cheers. PS: Jekyll Trivia #1 - Did You Know - Yes, you can log into a (static) Jekyll site, use the jekyll-auth addon (gem).
Building API with Rails 5
Rails API was recently merged into Rails master. Read more
Build a RSS feed in Ruby on Rails
Building a RSS feed in Ruby on Rails is very easy, it feels like almost built in. We use the XML Builder handler that comes with Rails, have a look to do it.
Slicing and Dicing Ruby Enumerables
Have you ever needed to group items in an array, or lines in a file? In this post we’ll discuss a few often-overlooked Enumerable methods that let you do just that. http://blog.honeybadger.io/ruby-enumerable-slicing-before-when-and-after/
Rubinius Compute
Amazon Lambda but built on the Rubinius Language Platform
Hash Comparison in Ruby 2.3
Speaking of Ruby 2.3, I wrote about the new Hash comparison methods which we merged into MRI trunk just a day ago. They should make comparing hashes much easier. You can try them out in 2.3.0-preview1.
Ruby 2.3.0-preview1 released
The first preview for Ruby 2.3.0 which should come out later this year was released today, installation instructions are available in this Gist to build it from source or via rbenv & ruby-build.
Faster development mode in Rails 5
Rails 5 is getting a speed boost in development mode for larger codebases thanks to the initial work done by Puneet Agarwal in one of the 8 GSoC projects for the rails framework. Read about it here:
Using Kaminari to paginate non-ActiveRecord query
Have you ever worked with SQL queries without ActiveRecord in a Rails app? In the post I review how to paginate raw query results with Kaminari.
Redefining a Private Method in Ruby
What are the different ways to Redefining a Private Method in Ruby? Read it here
A component based Rails architecture primer
Component based architecture is complementary to good object oriented practices and uses namespaces, test driven development and Ruby gems to gradually define application boundaries and enforce an internal dependency structure.
Ruby DelegateClass
There are many ways to work with Ruby Objects. Inheritance, module inheritance, decorators, and composition are all commonly found in a codebase. The Single Table Inheritance pattern is a common pattern in Rails applications to share responsibilities between classes and store all records in the same place. This approach can work just fine, but it might be beneficial to think outside the single table for a second.
Using splats to build up and tear apart arrays in Ruby
The humble splat operator (*) is one of those features of Ruby that just gets more interesting the more you look at it. In this post we’ll talk about how you can construct and manipulate arrays with splats. http://blog.honeybadger.io/ruby-splat-array-manipulation-destructuring/
Hack like a journalist
This week I presented a talk, “Hack like a journalist”, at the monthly meeting of LRUG (the London Ruby User Group). Based on my career experience working as both a software developer and in an editorial capacity, it takes a look at how one technique used by news writers – the ‘inverted pyramid’ – applies in the world of newspapers, and how the same principles can work in Ruby, to produce code that is readable and maintainable. Read more
Methods To Remember Things By: Ruby Memoization
No Rubyist wants to make expensive, time-consuming method calls more than they have to. Thankfully, using memoization means that we don’t have to (well, at least, not as often). This blog post covers the history behind memoization, its implementation, and its controversial history in the Rails source code.