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.
[ANN] Sudo Rails - Sudo mode for your Rails controllers
I just released a first version đ of a new gem: Sudo Rails, sudo mode for your Rails controller. You can easily protect any Rails action with a customizable password confirmation strategy (ships with Devise and Clearance integration), just use the sudo method: [more inside]
A Guide to Function Composition in Ruby
A comprehensive overview of Ruby 2.6âs âfunction compositionâ and how its new operators work, including how you can use them not just with Proc and Method but with any object that implements call. https://www.ghostcassette.com/function-composition-in-ruby/
How to Create Temporary Files in Ruby
Youâll learn about temporary files in Ruby. Exactly how to create them, how to use them & the key things you must know about. https://www.rubyguides.com/2019/05/ruby-tempfile/
kittyverse gem - cryptokitties helper classes for cattributes, traits, and more
Hello, Iâve updated the free (open source) kittyverse library / gem that includes helper classes for cattributes, trait types, traits, genes, genomes and more for cryptokitties and copycats cryptocollectibles (on the blockchain). Happy data wrangling and bits & bytes slicing w/ ruby. Cheers. Prost.
Feedi API - RSS
This service allows you to transform RSS feed into an awesome API. [more inside]
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