Giter Site home page Giter Site logo

final-project-practice's Introduction

Rails Template

This is a base Ruby on Rails repository configured for learning with Codespaces (and Gitpod).

  • Ruby version: 3.2.1
  • Rails version: 7.1.3.3

We've added additional Ruby gems and other software that aren't automatically available in a new Rails app, and configured

UJS and Turbo

In Rails version 7, support for Unobtrusive JavaScript (UJS) is not the default. Rather, this has been replaced with Turbo.

However, in AppDev, we typically want to first demonstrate UJS and then enable Turbo manually when we want it.

Therefore, UJS has been pre-configured here with these steps:

  • Pin UJS + jQuery in config/importmap.rb by running:

    % ./bin/importmap pin @rails/ujs
    % ./bin/importmap pin jquery
    
  • Add UJS + jQuery via:

    // app/javascript/application.js
    import jquery from "jquery";
    window.jQuery = jquery;
    window.$ = jquery;
    import Rails from "@rails/ujs"
    Rails.start();

UJS and Turbo can co-exist side-by-side with these instructions, which we already implemented here.

By default, Turbo is disabled via:

// app/javascript/application.js
import { Turbo } from "@hotwired/turbo-rails"
Turbo.session.drive = false

Set it to true to enable Turbo everywhere, or you can use data-turbo="true" to enable Drive on a per-element basis while leaving it globally false.

Additional gems:

Additional software:

  • OS Ubuntu 20.04.5 LTS
  • Chromedriver
  • Fly.io's flyctl
  • Google Chrome (headless browser)
  • Graphviz
  • Node JS 18
  • NPM 8.19.3
  • Postgresql 12
  • Redis
  • Yarn

VS Code extensions:

  • vortizhe.simple-ruby-erb
  • mbessey.vscode-rufo
  • aliariff.vscode-erb-beautify
  • eamodio.gitlens
  • setobiralo.erb-commenter

final-project-practice's People

Contributors

rezahusain avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.