How to use the @rails/ujs.start function in @rails/ujs

To help you get started, we’ve selected a few @rails/ujs examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github matestack / matestack-docs / app / javascript / packs / application.js View on Github external
// This file is automatically compiled by Webpack, along with any other files
// present in this directory. You're encouraged to place your actual application logic in
// a relevant structure within app/javascript and only use these pack files to reference
// that code so it'll be compiled.

require("@rails/ujs").start()
require("@rails/activestorage").start()
require("channels")

import 'css/custom-bootstrap'
import 'css/animation'

// Uncomment to copy all static images under ../images to the output folder and reference
// them with the image_pack_tag helper in views (e.g <%= image_pack_tag 'rails.png' %>)
// or the `imagePath` JavaScript helper below.
//
// const images = require.context('../images', true)
// const imagePath = (name) => images(name, true)

import MatestackUiCore from 'matestack-ui-core'
import '../../matestack/components/header'
import '../../matestack/components/toc/toc'
github decidim / decidim / decidim_app-design / app / packs / entrypoints / public.js View on Github external
import $ from "jquery"
import "core-js/stable";
import "regenerator-runtime/runtime";

import '../src/evote_check_nota'
import '../src/vizzs/datacharts'

// Images
require.context('../images', true)

// CSS
import './public.scss';

// This needs to be loaded after confirm dialog to bind properly
import Rails from "@rails/ujs"
Rails.start()
github erikdahlstrand / shrine-rails-example / app / javascript / packs / application.js View on Github external
// This file is automatically compiled by Webpack, along with any other files
// present in this directory. You're encouraged to place your actual application logic in
// a relevant structure within app/javascript and only use these pack files to reference
// that code so it'll be compiled.

require("@rails/ujs").start()
require("turbolinks").start()


// Uncomment to copy all static images under ../images to the output folder and reference
// them with the image_pack_tag helper in views (e.g <%= image_pack_tag 'rails.png' %>)
// or the `imagePath` JavaScript helper below.
//
// const images = require.context('../images', true)
// const imagePath = (name) => images(name, true)

import 'core-js/stable'
import 'regenerator-runtime/runtime'

import 'bootstrap/dist/css/bootstrap'

import { singleFileUpload, multipleFileUpload } from 'fileUpload'
github example42 / hdm / app / javascript / packs / application.js View on Github external
// This file is automatically compiled by Webpack, along with any other files
// present in this directory. You're encouraged to place your actual application logic in
// a relevant structure within app/javascript and only use these pack files to reference
// that code so it'll be compiled.

require("@rails/ujs").start()
const Turbolinks = require("turbolinks")
Turbolinks.start()
require("@rails/activestorage").start()
require("channels")
import "controllers"

import "@fontsource/open-sans/400.css"
import "@fontsource/open-sans/400-italic.css"
import "@fontsource/open-sans/700.css"

import "bootstrap"
import "../stylesheets/application"

document.addEventListener("turbolinks:load", () => {
  $('[data-toggle="tooltip"]').tooltip()
  $('[data-toggle="popover"]').popover()
github k0kubun / rspec-openapi / spec / rails / app / javascript / packs / application.js View on Github external
// This file is automatically compiled by Webpack, along with any other files
// present in this directory. You're encouraged to place your actual application logic in
// a relevant structure within app/javascript and only use these pack files to reference
// that code so it'll be compiled.

require("@rails/ujs").start()
require("@rails/activestorage").start()
require("channels")


// Uncomment to copy all static images under ../images to the output folder and reference
// them with the image_pack_tag helper in views (e.g <%= image_pack_tag 'rails.png' %>)
// or the `imagePath` JavaScript helper below.
//
// const images = require.context('../images', true)
// const imagePath = (name) => images(name, true)
github jurgen1c / CS-Media / app / javascript / packs / application.js View on Github external
// This file is automatically compiled by Webpack, along with any other files
// present in this directory. You're encouraged to place your actual application logic in
// a relevant structure within app/javascript and only use these pack files to reference
// that code so it'll be compiled.

require("@rails/ujs").start()
require("turbolinks").start()
require("@rails/activestorage").start()
require("channels")


// Uncomment to copy all static images under ../images to the output folder and reference
// them with the image_pack_tag helper in views (e.g <%= image_pack_tag 'rails.png' %>)
// or the `imagePath` JavaScript helper below.
//
// const images = require.context('../images', true)
// const imagePath = (name) => images(name, true)
github rubyforgood / voices-of-consent / app / javascript / packs / embed.js View on Github external
require("@rails/ujs").start()

// Code for the contact form component starts here.
import 'embed/behavior'
github kaishuu0123 / rebacklogs / app / javascript / packs / application.js View on Github external
// This file is automatically compiled by Webpack, along with any other files
// present in this directory. You're encouraged to place your actual application logic in
// a relevant structure within app/javascript and only use these pack files to reference
// that code so it'll be compiled.

require("@rails/ujs").start()
require("@rails/activestorage").start()
require("channels")

import {config, dom, library} from '@fortawesome/fontawesome-svg-core';
import { faPlusCircle } from '@fortawesome/free-solid-svg-icons/faPlusCircle';
import { faInfoCircle } from '@fortawesome/free-solid-svg-icons/faInfoCircle';
import { faInfo } from '@fortawesome/free-solid-svg-icons/faInfo';
import { faCheck } from '@fortawesome/free-solid-svg-icons/faCheck';
import { faBan } from '@fortawesome/free-solid-svg-icons/faBan';
import { faAngleRight } from '@fortawesome/free-solid-svg-icons/faAngleRight';
import { faPen } from '@fortawesome/free-solid-svg-icons/faPen';
import { faDoorOpen } from '@fortawesome/free-solid-svg-icons/faDoorOpen';
import { faTimes } from '@fortawesome/free-solid-svg-icons/faTimes';
import { faTrashAlt } from '@fortawesome/free-solid-svg-icons/faTrashAlt';
import { faComment } from '@fortawesome/free-solid-svg-icons/faComment';
import { faSquare } from '@fortawesome/free-solid-svg-icons/faSquare';
github ChaelCodes / HuntersKeepers / app / javascript / packs / application.js View on Github external
// This file is automatically compiled by Webpack, along with any other files
// present in this directory. You're encouraged to place your actual application logic in
// a relevant structure within app/javascript and only use these pack files to reference
// that code so it'll be compiled.

import Rails from "@rails/ujs"
Rails.start()
require("turbolinks").start()
require("@rails/activestorage").start()
require("channels")

// Rails comes with Turbolinks to make page loads faster
// But it can break with Vue, this plugin stops that
import TurbolinksAdapter from 'vue-turbolinks'
// Our Javascript Framework!
import Vue from 'vue/dist/vue.esm'
// Buefy is a UI Component Library
import Buefy from 'buefy'
import 'buefy/dist/buefy.css'

require.context('../images', true)

// Components
github cedarcode / webauthn-rails-demo-app / app / javascript / packs / application.js View on Github external
/* eslint no-console:0 */
// This file is automatically compiled by Webpack, along with any other files
// present in this directory. You're encouraged to place your actual application logic in
// a relevant structure within app/javascript and only use these pack files to reference
// that code so it'll be compiled.
//
// To reference this file, add <%= javascript_pack_tag 'application' %> to the appropriate
// layout file, like app/views/layouts/application.html.erb

var Turbolinks = require("turbolinks")
Turbolinks.start()

require("@rails/ujs").start()

import { Application } from "stimulus"
import { definitionsFromContext } from "stimulus/webpack-helpers"

const application = Application.start()
const context = require.context("controllers", true, /.js$/)
application.load(definitionsFromContext(context))