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.
Up the Ancestor Chain with method_missing
Clutch your carry-on luggage, because today we’ll travel all the way up the ancestor chain. We’ll follow a method call and see how it goes up the chain as well as find out what happens if the method is missing. And because we love to play with fire, we won’t stop there but continue on to playing with fire overriding the BasicObject#method_missing. If you pay attention, we might also use it in a practical example. No guarantees though. [more inside]
RubyKaigi and the Path to Ruby 3
The three major areas of planned improvement for Ruby 3 are performance, concurrency, and static analysis: https://developer.squareup.com/blog/rubykaigi-and-the-path-to-ruby-3/
How O'Reilly Media upgrades Rails apps with dual boot
“Dual booting” to streamline Rails upgrades is a hot topic right now, and my team at O’Reilly Media is on board. Here’s how we upgrade Rails now, using dual boot.
New form gem SexyForm.rb Released!
The first version of SexyForm.rb has now been released! SexyForm is a dead simple HTML form builder for Ruby with built-in support for many popular UI libraries such as Bootstrap. Pairs nicely with any Ruby web framework such as Rails. https://github.com/westonganger/sexy_form.rb This library was originally born from FormBuilder.cr that I created for the Crystal language. The pattern/implementation of FormBuilder.cr turned out so beautifully that I felt the desire to have the same syntax available in the Ruby language. What was awesome is that, the Crystal and Ruby syntax is so similar that converting Crystal code to Ruby was straight forward and quite simple.
Writing custom validations for Rails' models.
Hey guys check out this cool blog for writing custom validators for our app’s models. https://medium.com/@abhinavgarg1218/rails-custom-validations-109e3e42b6fd [more inside]
HNPWA built with Ruby on Rails and Stimulus.js
Sometimes you want a development side project that will push you. A project that is non trivial, and provides lots of opportunities to build a complicated, data hungry application. Here is an example of such a project that rivals any complicated website in performance, and interactivity, built entirely in Ruby on Rails and Stimulus.js https://johnbeatty.co/2019/05/06/hnpwa-with-rails-and-stimulus-introduction/
[Screencast] Nested Forms from Scratch with StimulusJS
Using StimulusJS controllers, adding nested forms to a Rails application is easy and unobtrusive. In this episode, we look at an alternative way of creating nested forms without the Cocoon gem. https://www.driftingruby.com/episodes/nested-forms-from-scratch-with-stimulusjs
Luda - A UI framework will be loved by designers and developers.
Hello, I’m the author of Luda. Luda is a lightweight and responsive UI framework for modern web development. I created a gem for Ruby developers. Gave it a try! You’ll like it.
Create An Array With A Single Hash Without The Curly Braces In Ruby
Something I accidentally discovered I can do in ruby: [more inside]
Ruby Conferences 'n' Camps in 2019 Update - What's Upcoming in May? What's News?
Hello, I’ve updated the Ruby Conferences ‘n’ Camps in 2019 - What’s Upcoming? Calendar page @ Planet Ruby. ++ Tue+Wed May/14+15(2d) - Ruby Conference Cracow @ Cracow, Poland ++ Fri+Sat May/17+18(2d) - Balkan Ruby @ Sofia, Bulgaria ++ Fri May/24 (1d) - Pivorak Conf @ Lviv, Ukraine ++ Sat+Sun May/25+26(2d) - Ruby Unconf Hamburg @ Hamburg, Germany. Happy meeting up with rubyists in 2019. Cheers. Prost. PS: Do you have a favorite conference? Let’s give a shout-out to EuRuKo 2019 (in June in Rotterdam, the Netherlands).
Efficient algorithm to check dates overlap
Have just completed edit some of my articles posted earlier. I promise, it will be interesting read: https://railsguides.net/date-ranges-overlap/
Simple Immutable Ruby URI builder
Class Iri helps you build a URI and then modify its parts via a simple fluent interface, for example: Iri.new('http://google.com/').add(limit: 50) will produce http://google.com?limit=50. The gem is here: https://github.com/yegor256/iri
search_flip v2.0.0 released - The chainable ElasticSearch Client
search_flip, the ElasticSearch client with elegantly chainable queries and minimal dependencies is just released as v2.0.0 now. This version includes a huge bunch of great new features: improved alias, routing, bulk, analyze and connection support to name just a few. [more inside]
Truemail 0.1.9 released 🎉 - configurable plain Ruby email validator
The Truemail gem helps you to validate emails by regex pattern, presence of domain mx-records, and real existence of email account. Also new Truemail allows performing an audit of the host in which runs. https://github.com/rubygarage/truemail
A simple guide to create an web app with React and Rails API
Learn by doing, to integrate ReactJS as frontend and Rails API for the backend, all in one Rails app codebase. Here’s the Article
Using Bootstrap with Webpacker and Rails 6
In the past, we’d install Bootstrap using the Rubygem. Now with Rails 6 using Webpacker for Javascript, we can use the node module to import Bootstrap’s CSS and JS. Learn how to use Bootstrap with Webpacker
How to download images files in Ruby
The easiest way to download an image or file in Ruby is using open-uri. This post looks at how to do that, what the potential problems are and how to do it better. This is my view on how to download images in Ruby.
Contract Scripting for Everyone: Hyperledger FabCar Chaincode Sample in (Secure) Ruby
Hello, for the Vienna Hyperledger Meetup I’ve put together a talk titled “Contract Scripting for Everyone: (Hyperledger) FabCar Registration Sample - From Go Lang Chaincode to (Secure) Ruby Contract Scripts” that shows that - surprise, surprise - (secure) ruby works great for (contract) scripting. Code is code and Hyperledger Fabric is really just a key-value store, that is, a simple hash table. Yes, we are still waiting for the SQL (relational) revolution in the blockchain world. PS: Bonus slides - Do you need a blockchain? TL;DR Version - No.
Rails 6: B-Sides and Rarities
Rails 6 contributor and early adopter Vladimir Dementyev walks you through the B-sides and rarities of the upcoming release, focusing on smaller features that appeal to mature applications.