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.
Testing JavaScript... with Ruby!
One of the many projects we are building is a JS client-side library, which runs in a pretty challenging environment: has to support pretty much every browser in existence and interacts with a gaggle of external scripts and services. Since Codest is primarily a Ruby shop, that’s what we chose to exercise it with - and here’s how you can, too.
Three Useful Data Migration Patterns for Rails
Do you know what’s the best way to write, maintain, and run migrations that alter the data in your production database? In this article we will talk about three different patterns for writing and maintaining your data migrations. [more inside]
Everything You Need to Know About I/O In Ruby
What is IO in Ruby? How does it help you? What are file descriptors? Discover the answers in this new RubyGuides article: https://www.rubyguides.com/2019/02/ruby-io/
Carve your controllers like Papa Carlo
This post introduces a new gem–Rubanok–which could be used to slim down your controllers by extracting params-dependent logic (such as filtering, searching, sorting, etc.) into its own abstraction layer. For better readability, maintainability and testability! Vivat!
DIY - Create your own Rails Generator
Hey guys, I just wrote my first tech blog post ever! It would mean a lot if you would read it and give some feedback! [more inside]
How network programming is represented in Ruby
In this article, we’re going to see how Ruby implemented network programming in its Core and Standard libraries.. The implementation surprisingly and naturally fits to the language features SEE MORE
Ruby on Rails API Authentication
If you are building any kind of API with Ruby on Rails you are going to have to handle authentication if you want to secure your endpoints. If you’re using devise with its pre-built authentication you’ll see that when it comes to managing the Authentication of an API endpoint devise falls slightly short. In this post we will show you some of the options you have with securing your Rails API endpoints and how you can integrate them into devise.
Come wield Ruby for good in the SF bay area!
Write open source to make the world a better place! Join us at Ruby by the Bay March 29 – April 1 in Marin headlands at NatureBridge. Programmers come together a long weekend to write software for non-profits and community organizations. (Most projects are Ruby, but there’s often JavaScript or devops or design projects as well.) This is not a hackathon! Projects are scoped with our nonprofit partners before the event, and evenings are reserved not for code but to play games, karaoke, or sit around a campfire. [more inside]
Simplifying Complex Queries with the ActiveRecord Union Gem
The ActiveRecord Union gem allowed me to quickly build a newsfeed that had complex requirements. [more inside]
Page Objects in Rails
For integration tests/feature specs that are noisy and hard to understand, Page Objects can be a handy way to improve the signal-to-noise ratio. https://www.codewithjason.com/page-objects-rails/
Rescue from errors with a grace
Tired of having too long or complex rescue instructions? Try this pattern
Small, Smart, Secure, Safe, Solid & Sound (S6) Ruby - New Org (Incl. Red Paper, ...)
Hello, sruby - Small, Smart, Secure, Safe, Solid & Sound (S6)
Ruby now has a new home. See the
/s6ruby org(anization) at github. The new org incl. the “Red Paper”, the Universum world computer runtime, sample contract scripts, the Programming Crypto Contracts step-by-step book / guide and more. Last but not least - thanks to Matz for Ruby and for the sruby tweet! Cheers. Prost.
Make Delegated Methods Private in Rails
Calling delegate in the private visibility scope of a class has no effect in Rails. Rails 6 has a way to allow making delegated methods private, but read on to see how this can be done in Rails 5.2 or earlier: https://nithinbekal.com/posts/rails-delegate/
Interview with Terence Lee
Chris and Jason had Terence Lee on the Remote Ruby Podcast to discuss how Terence got into programming and found himself on The Ruby Core Team, mruby, conference organizing, and more. Listen to the Remote Ruby podcast episode
AnyLogin - gem to login as any user (now with one more cool feature)
https://github.com/igorkasyanchuk/any_login was updated. I think one of the most useful gem for development. I forgot when last time I’d entered email/pass in login form in dev mode.. [more inside]
Adding Google Analytics to a Rails 5 / Turbolinks 5 app
Step by step instructions for setting up Google Analytics on a Rails 5 / Turbolinks app.
Using racecar to Consume Kafka messages in Rails
In this article Using racecar to Consume Kafka messages in Rails , I setup a simple producer using waterdrop gem and consume the messages using racecar. I also illustrate how to troubleshoot problems when running multiple kafka consumers consuming messages from the same topic using kafkacat.
prettier for Ruby
prettier-ruby https://github.com/kddeisz/prettier-ruby is now ready for folks to try out! Please give it a shot and open up issues if you run into any!
Inheritance on-the-fly with Ruby on Rails
Today we’re going to talk about the way that Ruby on Rails ensure the compatibility of your migrations when you upgrade Ruby on Rails. [more inside]
Leaving Breadcrumbs in your Progressive Web App with Stimulus.js
This is a tutorial on using Stimulus.js to create a breadcrumbs in your progressive web app. PWAs can be displayed without any browser chrome, including back and forward buttons, so your app is now responsible for some kind of back and forth mechanism. https://johnbeatty.co/2019/02/06/leaving-breadcrumbs-in-your-progressive-web-app-with-stimulus-js/
Avoiding Junk-Drawer Classes in Ruby
We’ve all seen classes bloat over time and become junk-drawers of loosely-related methods. This post discusses the underlying cause of the junk-drawer problem and how we can avoid it by taking a cue from Elixir. [more inside]
Tips for running free dynos on Heroku in 2019
I see a lot of confusion around Heroku’s free dynos, so I wrote a guide. Here’s everything you need to know, and how to make the most of Heroku’s free offerings. [more inside]
Creating the simplest CMS in the world with Rails and Google docs
simple solution for content driven websites. https://medium.com/@amalrikmaia/semi-static-pages-with-google-docs-da70d4398406
Top 5 Things to Build while Learning Web Development
When learning web development it can be fustrating to know what to focus your efforts on. Especially when you are trying to land that first job or freelance gig. This post is designed to expose those learning web development where to focus their energy.