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.
Dealing with all the various classes that store times and dates in Rails can be confusing, and even experienced developers get tripped up when comparing timestamps that look the same but actually aren’t. This short post will show you how to code defensively when testing and comparing times.
Hello, I’ve added the Hoe Developer’s Guide - Build, Package and Publish Gems with Rake Tasks - Ready-to-Use Build Scripts by Ryan Davis et al to the Yuki & Moto Press Bookshelf. Free Online Books (and Booklets) about Ruby ‘n’ Friends in the Manuscripts format and built with Jekyll and Octobook themes. Happy reading. Cheers.
Since many years the ruby community asked to have branch coverage. That’s something that if you worked a little bit with JS frameworks you really missed. If you don’t miss it, you probably don’t know what is branch coverage and therefore you are in the right place. We have branch coverage now, and that’s great!
A null value is something different than false. It may be confusing especially for Ruby developers. Build a valid query and deal with null values right - show me this tip
Hello, I’ve added How I Start - Let’s Build a Ruby Gem Together! by Steve Klabnik to the Yuki & Moto Press Bookshelf. Free Online Books (and Booklets) about Ruby ‘n’ Friends in the Manuscripts format and built with Jekyll and Octobook themes. Happy reading. Cheers.
Managers would love that. Active Record provides nice, simple and powerful methods for counting things we have in our database - I want to improve my app performance
Hello, I put together a new (free online) book titled Best of Practicing Ruby (Book Edition) @ the Yuki & Moto Press Bookshelf that collects the best articles from the practicing ruby series headed by Gregory Brown with guest chapters by Luke Francl, Magnus Holm, Aaron Patterson, Solomon White and others. Topics include: A minimal HTTP server - Event loops demystified - Parsing JSON the hard way - Tricks for working with text and files - Working with binary file formats - and much more. Happy hacking. Happy reading. Cheers.
Hello, I’ve updated the awesome ruby meetups page @ Planet Ruby. For (easier) updating every contintent has now its own page - Europe • America - North / South • Asia • Africa • Pacific/Oceania. Updates welcome :-). Note: The online version is an all-in-one page again, see Awesome Ruby Meetups. Happy hacking together. Cheers.
Mostly, writing a spec you would like to stub classes used in a class that you are testing. We don’t want to hit the database if it’s not needed. Read more at http://pdabrowski.com/blog/ruby-on-rails/testing/rspec-simple-stubs/
Hello, I’ve started a new calendar site @ Planet Ruby. The idea is to publish monthly updates. What’s Up in 2018/1? - Ruby Conferences & Camps in January 2018 from Around the World. Cheers.
While event sourcing as an architectural pattern is useful to understand, it is not commonly used when starting a new project or service, which generally start their life as simple CRUD applications. Event sourcing works best when chosen as a top-level architecture for a new service from the start. Learn how to implement Event-Driven Microservices with RabbitMQ and Ruby
Sometimes built in validations are not enough so we have to write our own validation rules. Because of this, our models can become fat really quick so the best idea to avoid it is to extract validation logic to separated classes. Such approach makes the code more clean, isolated and reusable - http://pdabrowski.com/blog/ruby-on-rails/validations/building-custom-validator/
TypeError is raised when encountering an object that is not of the expected type.
TypeError appears in many other places, such as when converting one type to another using built-in conversion functions like
Hash(). Check out an example of using TypeError in some Ruby code.
AWS Fargate lets you run Docker containers without managing infrastructure. Learn how to deploy your Rails app via AWS Fargate in this step-by-step video tutorial and blog post.
The bootstrap_form gem makes it easy to build beautiful forms with Bootstrap styles using the built-in Rails form helpers. The project has been around for several years and has over 1MM downloads. This year, after a brief hiatus, we are revamping bootstrap_form to support Bootstrap v4 and planning a big release. If you use bootstrap_form today, take a look at our roadmap to 4.0. We are always happy to welcome new contributors!