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
Note: Only the first pargraph is shown on the front page and overly long paragraphs may be broken up.
A neat slides deck explaining why would a Rails programmer fall in love with SPA.
Ruby provides a few interesting mechanisms that make it easy to “try again” when exceptions happen - though not all of them are obvious or well-known. In this post we’ll take a look at these mechanisms and how they work. http://blog.honeybadger.io/how-to-try-again-when-exceptions-happen-in-ruby/
Native. You can also export Ruby objects using
Continuing our “Building a Form Data Service with Rails” video series, I’m going through the process of adding the user registration and login features. Check it out!
While we would love if every single company outsourced their application development to SmartLogic, there are some situations where outsourcing some or all application development is not the best decision. While we genuinely believe that outsourcing some development to the right firm can be an invaluable source of knowledge for any in-house team, sometimes that neither possible nor advisable. [more inside]
I’ve published a new experiment on “cool” graphics with Ruby & RMagick: drosterize, which does self-replicating recursive images. And also shared some thoughts on implementing it.
It seems transactional emails are an afterthought for developers, but it’s an important part of doing business online. The most successful software business, especially ecommerce, optimize their transactional emails to increase engagement and revenue. If you want to leverage (or help your client leverage) transacational emails as a communication tool that drive business results, I’ve compiled the best content on the topic into an email course for you. In the email course, we’ll cover… ++ What exactly are transactional emails? And why are they important? [more inside]
Everything provides a service these days, including the software that we write! But sometimes, our own code needs a service to show up and handle a task. Enter service objects, a simple way to use Plain Old Ruby Objects to service your application. This blog post explains how and when to abstract and encapsulate your ideas into a service object and help you separate your concerns.
Ravil Bayramgalin writes about a feature he did for the upcoming Ruby on Rails version, rendering views outside of actions (such as, in background jobs or when producing email attachments). [more inside]
As a programmer, we can configure our application to work with multiple databases. In this document we are going to explain how we can achieve this in a Rails application. To read full visit : RailsCarma Blog
Ever wanted to know which method caused an exception - even if the exception was swallowed before you could get your hands on it? You can do all this and more with the magic of TracePoint. http://blog.honeybadger.io/using-tracepoint-to-explore-complex-exception-behavior-in-ruby/
Hi all! I’ve put up a new RubyTapas freebie video today. It’s about un-indenting strings. This is a solved problem, of course; but this video walks through the process of applying assorted handy Ruby features to take it from several lines of code to one very succinct line. You might learn something new along the way. See the episode, along with some celebratory birthday discounts, here.
If you’ve ever needed to allow users to insert their own variables into strings they provide, this gem will hopefully be of interest. It works with ActiveRecord to provide easy user-facing string interpolation. https://adamcooke.io/string-interpolation-in-ruby/
The UNIX has survived for almost 5 decades and will survive for another 5 decades or more. What if we could build Gems that could evolve and still provide useful unit of functionality for decades to come? The ‘What’ is found in the tests, the ‘How’ is found in the production code and the ‘Why’ is not found in any form of code. The ‘Why’ is the design decisions that developers make and it evolves over time. Some of the ‘why’s can be found in the form of comments, blog posts and as discussion threads between the developers on forums. How can we minimize the time spent on ‘Why?’. Can developers become more productive by developing Micro Gems that follow the UNIX philosophy? Read more about this topic : Micro Gem : A Look at the Future by Looking at the Past
When developing a web application, templates usually need to implement some logic, especially conditionals. I’m going to show you two patterns which are commonly used in web development with Ruby on Rails: presenters and decorators. They are meant to move template logic to dedicated classes, so templates look cleaner and more object oriented. http://davidmles.com/blog/presenters-decorators-rails/
I’ve written a microlibrary for rescue exceptions declaratively in your Ruby classes. Rescata dry up your code from
begin... rescue... ensure.... end It provides you a method for rescue methods using other methods, lambdas or blocks. Also, this gives you freedom to build any custom solution to rescue for specific error classes.. Hope you enjoy it!