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 archonic / limestone-accounts / 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

import 'jquery'
window.$ = window.jQuery = require('jquery');

import 'bootstrap'

import Rails from 'rails-ujs';
Rails.start();
window.Rails = Rails;
import Turbolinks from 'turbolinks';
window.Turbolinks = Turbolinks;
Turbolinks.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))

import * as ActiveStorage from "activestorage"
ActiveStorage.start()

// Does not process requires when imported like this
import '../packs/src/subscriptions'
github schneidmaster / gitreports.com / app / assets / webpack / application.js View on Github external
// Polyfills.
import 'core-js/fn/array/from';
import 'whatwg-fetch';

// Set up rails-ujs.
import Rails from 'rails-ujs';
Rails.start();

// Scripts.
import 'javascripts/alert';
import 'javascripts/nav';
import 'javascripts/profile';

// Styles.
import 'bootstrap/dist/css/bootstrap';
import 'stylesheets/layout';
import 'stylesheets/nav';
import 'stylesheets/simple_captcha';
github Email-Dashboard / Email-Dashboard / rails-dashboard / app / javascript / packs / application.js View on Github external
const Rails = require('rails-ujs');
Rails.start();

import Turbolinks from "turbolinks";
Turbolinks.start();

// import Filter from 'components/filter'

import WebpackerReact from 'webpacker-react'

import CodeMirror from 'codemirror';
import 'codemirror/lib/codemirror.css';
// import 'codemirror/theme/railscasts.css'
import 'codemirror/mode/htmlmixed/htmlmixed';

// WebpackerReact.setup({Filter})

import "./../src/application.css"
github aha-app / collaborative-demo / app / javascript / packs / application.js View on Github external
// 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

import Rails from "rails-ujs";
import Turbolinks from "turbolinks";
import ActionCable from "actioncable";
import "src/collaborative_editor/index";

window.App || (window.App = {});
window.App.cable = ActionCable.createConsumer();

Rails.start();
Turbolinks.start();
github publiclab / mapknitter / app / webpacker / 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")

import Rails from 'rails-ujs';
import Turbolinks from 'turbolinks';

Rails.start();
Turbolinks.start();

import 'bootstrap/dist/js/bootstrap';
import 'jquery';
import 'jquery/dist/jquery';
import 'jquery-ujs';
import 'jquery-ujs/src/rails';
import 'leaflet/dist/leaflet';
import 'leaflet-providers/leaflet-providers';
import 'leaflet-toolbar/dist/leaflet.toolbar';
import 'leaflet-distortableimage/dist/leaflet.distortableimage';
import 'leaflet-easybutton/src/easy-button';
import 'sparklines/source/sparkline';
import 'glfx-js/dist/glfx';
import 'webgl-distort/dist/webgl-distort';
github getcampo / campo / app / webpacker / javascripts / application.js View on Github external
import Rails from "rails-ujs"
Rails.start()

import * as ActiveStorage from "activestorage"
ActiveStorage.start()

import Turbolinks from "turbolinks"
Turbolinks.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))

import "./cable"
github tai2 / webpacker-react-example / app / assets / javascripts / application.ts View on Github external
import 'babel-polyfill'
import 'javascripts/change-query'
import * as Rails from 'rails-ujs'

Rails.start()
github dwightwatson / neontsunami-laravel / resources / assets / js / admin / app.js View on Github external
import 'selectize';
import './bootstrap';
import Vue from 'vue';
import Rails from 'rails-ujs';
import { kebabCase } from 'lodash';
import 'bootstrap-sass/assets/javascripts/bootstrap';

Rails.start();

const app = new Vue({
  el: '#app',

  mounted() {
    if ($('input[name=slug]').length && $('input[name=title], input[name=name]').length) {
      $('input[name=title], input[name=name]').on('keyup', event => {
        const slug = kebabCase(event.target.value);

        $('input[name=slug]').val(slug);
      });
    }

    $('input[name=tags]').selectize({
      plugins: ['remove_button'],
      persist: false,
github getcampo / campo / app / webpacker / javascripts / application.js View on Github external
import "bootstrap"

import Rails from "rails-ujs"
Rails.start()

import * as ActiveStorage from "activestorage"
ActiveStorage.start()

import Turbolinks from "turbolinks"
Turbolinks.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))

import "./cable"
github snibox / snibox / app / javascript / packs / common.js View on Github external
Notifications.confirm(
      element.getAttribute('data-text'),
      result => confirmed(element, result)
  )
}

const confirmed = (element, result) => {
  if (result.value) {
    element.removeAttribute('data-confirm-swal')
    element.click()
  }
}

Rails.delegate(document, 'a[data-confirm-swal]', 'click', handleConfirm)

Rails.start()

smoothscroll.polyfill()

rails-ujs

Ruby on Rails unobtrusive scripting adapter

MIT
Latest version published 2 years ago

Package Health Score

75 / 100
Full package analysis

Similar packages