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.
We had a tricky problem. We knew that the columns for one particular model would need to change over time. That was easily solved with a JSON field, but we also wanted to support validations on this field – validations that are assigned to the model at the time of creation. Read the article by Heitor Silva
Hello, I’ve put together a new pragmas gem / library for language syntax pragmas that lets you turn on the future today or add your own ideas for easy (re)use for everyone. Let’s evolve the ruby language together by experimenting in the wild in a pragma(tic) way. First language syntax pragmas include match patterns, enum and type types, auto numbered arguments, and more. What’s your idea / pragma? Yes, you can. Happy coding in (future) ruby with pragmas. Cheers. Prost.
I have described the problem of automatic refresh of materialized database view in PostgreSQL and provided an example solution to that problem using database triggers. https://www.netguru.com/codestories/materialized-view-refresh-problem-and-how-to-solve-using-database-triggers-in-ror-based-application
Hello, I’ve put together michelson - a test simulator and runtime library / gem that lets you write and run type-safe ‘n’ functional (crypto) contracts in yes, it’s just ruby. See the Let’s Count or the Let’s Vote examples to get started with functional type-safe Liquidity (OCaml/ReasonML)-style programming in ruby. Happy (crypto) contract programming and blockchaining with (secure) ruby.
Because now use can use an object’s shadow!
In this episode, we take a tour of what Kubernetes is, how to install and configure a local development instance, and deploying a sample application. https://www.driftingruby.com/episodes/introduction-to-kubernetes
In the first part of this series, we were exploring some potential options for communication between services – what their advantages and disadvantages are, why HTTP API is not necessarily the best possible choice and suggesting that asynchronous messaging might be a better solution, using, e.g. RabbitMQ and Kafka. Let’s focus this time entirely on the latter. [more inside]
Hello, I’ve put together a cheat sheet / white paper that lets you compare “pragmatic” (Secure) Ruby to “functional” Liquidity (w/ ReasonML Syntax) / Michelson side-by-side with a Counter, Vote and Minimial Viable Token contract example. Happy crypto (contract) programming with ruby. Cheers. Prost.
How to use LDAP to login and logout a user using OmniAuth and LDAP. We will also see how to search for a user and test LDAP server connectivity. Read more: Using LDAP to Login and Logout Users in Rails apps
I’ve just published a tutorial for creating a chat application with Rails and WebSockets from scratch.
Changing the database adapter for a Rails app has always been an annoying, manual change to make. Rails 6.0 introduces the “rails db:system:change” command to make this easier using all the built-in generators for database.yml and more. See how to use the rails db:system:change command
Hello, for the Vienna.rb April meetup I’ve put together talk notes on: The State of Bool in Ruby - Everything Your Never Wanted to Know . The contents reads: Trivia Quiz - The States of Bool ++ Bool Basics / Classes, Classes, Classes // Truthy and Falsy - (Almost) Everything is True // The state of built-in bool conversions -
to_bool and so on. Happy coding in ruby with (or without) Bool. Cheers. Prost.