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.
Why classes eventually reach 50 columns and hundreds of methods
Find out what happens and what we often miss as developers when our applications continue to grow for a long time [more inside]
Segment Open Fellowship 2017
The Fellowship is a three month long program supporting three to five open-source developers with $8k per month to focus full-time on their project, no other strings attached. More details Segment Open Fellowship 2017
A silly coding error around case/when
A little writeup of a bug in my code around case/when syntax.
Podcast interview with Eileen Uchitelle about Rails Core
How does the Rails core team work? How are new features planned and implemented? How can I contribute? What should I do if I find a security issue in Rails? Our guest is the newest Rails core team member Eileen Uchitelle (@eileencodes) joins Table Xi senior developer Andrew Horner and host Noel Rappin (@noelrap) to discuss Rails, the new testing features in Rails 5.1, and the Rails Core Team. [more inside]
ActionCable: The Missing Guide
If you need server-side triggered updates, multi-user interaction, or simply more dynamic content, ActionCable might be a good fit for you. Read more
Monitoring Sidekiq using AWS Lambda and CloudWatch
I wrote a new article on Monitoring Sidekiq using AWS Lambda and CloudWatch. Hope you enjoy!
RailsConf 2017: 5 standout performance sessions
I’m a performance addict, so I’ve been scanning through the sessions and making notes of the ones that stand out. My short-list of performance-related sessions.
7 Considerations and Tradeoffs To Consider in Configuration Strategies
With the tech ecosystem being the thriving exemplar of diversity that it is, nearly every service provider (/third-party library/other programmer who ever existed) will instruct you in their project READMEs to handle configuration in a different way. [more inside]
10 Ruby on Rails Best Practices
In this post, we’re going to look at some of the best practices in Ruby on Rails. https://www.sitepoint.com/10-ruby-on-rails-best-practices-3/
Dry-Validation as a schema validation layer for Ruby on Rails API
Integrating dry-validation with your Ruby on Rails API endpoints can give you multiple benefits. Learn why and see how in this article: Dry-Validation as a schema validation layer for Ruby on Rails API
Pluck deeply into nested associations
pluck is great when you simply want the attributes without the need of model construction. But if you want to pluck associated models’ attributes, you unfortunately can’t. deep_pluck allow you to pluck deeply into nested associations without loading a bunch of records. And DRY up your code when using #as_json.
From Rails to Hanami: Controllers
The second article of a series comparing Rails and Hanami, in which we will build a ToDo app showing the Rails version of the code, and how to achieve the same in Hanami. https://blog.codeminer42.com/from-rails-to-hanami-controllers-ad7ef6d09dd0
How to Use Ruby and Watir to Scrape The Web?
Have you ever had the problem that some services miss an API integration and you need to click through a page manually? Or you wanted to automate a process? Here comes Watir, an open source Ruby library build for automated tests. Learn more here: https://www.nopio.com/blog/web-scraping-with-watir/
[Screencast] Pagination with Kaminari
When displaying a significant number of records, it is often a basic functions in a web application is to paginate the records and load them as requested. https://www.driftingruby.com/episodes/pagination-with-kaminari
Tutorial: Uploading files in your Rails application
Uploading files into your Rails application has never been easier, and with the a wealth of useful gems around to help there’s no better time to be working with files.In this tutorial, I’m going to run through uploading an image. https://atech.blog/atech/file-attachments-in-rails-tutorial
Why using constant mocking in RSpec is a bad idea?
This blog post explains why you should never write expect(Noo).to receive(:doo).and_return(bar)
[more inside]
tty-editor v0.2.0
The latest tty-editor provides revised #open api that allows to distinguish between file and text content opening. It also adds support for Windows. Enjoy and happy hacking!
How to change the default new line delimiter in Ruby
One of the core pillars of motivation is having the opportunity to use some form of autonomy at the work that you do. Ruby programming language allows you to do just that with a lot of its built-in features. It gives you the ability to override methods of basic built-in classes, methods and also attributes. One such attribute in which we will focus on this article is the ability to change the default new line delimiter. http://www.fatosmorina.com/change-default-new-line-delimiter-ruby/
TheOpenCMS. Weekly report #3
Hi there! There is a weekly report about my progress on my CMS project Changelog vol. 3
Testing Jekyll Websites with Capybara
Do you have tests for your Jekyll website? If not, it’s pretty straightforward to test your Jekyll website using Capybara. http://phansch.net/2017/03/13/testing-jekyll-websites/
Thredded v0.11.0: Onebox support and more
Thredded, the best Rails forum engine, has just released v0.11.0. Major new features include onebox support, and the ability to automatically follow all new topics. See the release notes at https://github.com/thredded/thredded/releases
Decoupling from Rails [Part 1] - Repository and UseCase
This article will show how to decouple business logic from Rails-specific code. http://rubyblog.pro/2017/03/decoupling-from-rails-repository-and-use-case
[Brasilian] Pratical Guide: Spaceship-operator
Take a look at : https://merubygirl.wordpress.com/2017/03/22/spaceship-operator/ , a programming blog for people that already code, wanting to learn Ruby.
When you notice something strange in your benchmarks
Remember there are two layers of your code - Ruby code that you wrote and Ruby’s C engine. Here’s a story of unusual benchmark results that lead to changing Ruby’s internals.