How to call an external JS file from a remote location and execute methods of that JS file within a controller?

Open
#54 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
20/100
Issue type
Documentation
Clarity
Needs clarification
Activity status
Stale
Tech stack
javascript, rails, ruby
Domain
backend, tooling

Research direction

The issue names no repository file or test; start by reading the ExecJS public API and how it relates to Ruby controllers and the remote URL. Done would require a maintainer-approved documented answer about whether this use case is supported, with the requested sample if it is.

Written by the indexing model from the issue text.

Description

I want to call this file : https://cdn.jsdelivr.net/tappy/latest/mainfile and use some methods directly from Rails controller. Is it possible?
If possible could someone post a sample code snippet of how this can be done?

Dominant language
Ruby
Stars
578
Forks
286
PR merge metrics
No merged PRs in 30d

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from rails/execjs

All issues in rails/execjs

Similar issues

More Ruby issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.