Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

conflict tag <%= remote_id %> with ruby on rails while using in erb.html file #116

Open
devstracks opened this issue Dec 12, 2023 · 0 comments

Comments

@devstracks
Copy link

The issue arises from the conflict between the ERB tags <%= remote_id %> and Ruby on Rails syntax. The tag <%= remote_id %> is interpreted as a Ruby variable or method within the ERB context, causing the error "undefined local variable or method 'remote_id'.
How can i solve this

youtubereels: {
regex: /https?://www.youtube.com/shorts/([^\/\?\&]*)/,
embedUrl: 'https://www.youtube.com/embed/<%= remote_id %>',
html: "<iframe width='600' height='338' src='https://www.youtube.com/embed/<%= remote_id %>' frameborder='0' allowfullscreen></iframe>",
height: 338,
width: 600,
id: (groups) => {
const extractedId = groups[0];
const llk = groups.join('/embed/')
console.log('YouTube Reels Video ID:', groups);
return llk;
},
},

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant