Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8117833
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T04:18:14+00:00 2026-06-06T04:18:14+00:00

I have these a coffeescript file for a model entree that just instanciates a

  • 0

I have these a coffeescript file for a model entree that just instanciates a class in another coffeescript file:

jQuery(document).ready ->
  ch = new CepageHandling
  ch.handleKeyPress()

The handlePress function captures keyup events on a control.

I have another model vin where I want to enable the same feature. I’m surprised to see I don’t need to do anything (it already has the same html), it’s already working, even though the coffeescript for the vin model is completely empty. I assume that the created javascript for entree gets called even when I’m not on this page.

I have seen the same behavior with scss files, where style defined for one model gets applied to others if the descriptors match. Can someone explain (or point to some article) if this is normal behavior that assets are not isolated in rails? I really have a hard time grasping how it works.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-06T04:18:16+00:00Added an answer on June 6, 2026 at 4:18 am

    The default manifest files (application.js, etc) do require_tree . which will load all files on all pages, concat them all together in production, etc. If you want things to be isolated you’ll need to put a test in your ready handler to skip this code in some cases, or you’ll need more manifests (and not use application.js for example) to silo your code per page. I suggest you read every word of the asset pipeline Rails Guide very carefully… required reading!

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have these two modules : package G1; sub new { my $class =
Warning: Code is in Coffeescript. I hope that's ok. I have a model, Song
I have these two classes public class Person { } public class Company {
I have these classes. class Author{ Person person } class Person{ String lastName String
I have these 3 file in my program: sample1.h (method in sample1.cpp are defined
I have these 2 methods in the View class. the drawRect method always gets
I have the following code inside a class. (It's coffeescript-- and it's for a
I have these pages: information.php <div id='content'>Foo Bar</div> main.php <div id='main'></div> <script type=text/javascript> $(document).ready(function()
I have these kind of records in a file: 1867 121 2 56 1868
I have a working coffeescript/backbone idiom that looks like this: SidebarWidgets = ((() ->

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.