Using Opal Ruby with Rails 7

This page summarizes the projects mentioned and recommended in the original post on dev.to

Our great sponsors
  • WorkOS - The modern identity platform for B2B SaaS
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • SaaSHub - Software Alternatives and Reviews
  • Opal

    Ruby ♥︎ JavaScript

  • Normally, JavaScript must be involved to interactively build the Baseball Card, but thanks to Opal, we can write most of the code in pure Ruby instead. Note that some Opal Native code was mixed in as well (that is using ticks to execute small bits of JS inside the [Ruby](https://www.ruby-lang.org/) code just like when you use ticks in CRuby to shell out into the command line terminal), thus demoing this Opal capability too.

  • opal-jquery

    jQuery for Opal

  • Next, let's refactor the code to utilize Opal jQuery in Ruby instead of plain Opal. This simplifies the code in app/assets/javascript/application.js.rb quite a bit:

  • WorkOS

    The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.

    WorkOS logo
  • ruby

    The Ruby Programming Language

  • Opal enables writing web front-end code in Ruby, thus producing highly maintainable, productive, and understandable code on both the client-side and server-side.

  • Ruby on Rails

    Ruby on Rails

  • Next, let's build a complete Rails application using Opal Ruby instead of JavaScript, called Baseball Cards!

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts