Skip to content

Note to jsbundling/esbuild users (Rails is not defined) #47

@basicfeatures

Description

@basicfeatures

You will probably need this in your application.js 👍

// Infinite scroll requires Rails to be globally defined
// https://github.com/rails/rails/issues/36686
import Rails from "@rails/ujs";
window.Rails = Rails;

if(Rails.fire(document, "rails:attachBindings")) {
  Rails.start();
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions