To my understanding, all of your JavaScript gets merged into 1 file. Rails does this by default when it adds //= require_tree . to the bottom of your application.js manifest file.   This sounds like a real life-saver, but I am a little concerned ab...
If I'm using //=require_tree . in application.css, is there a way to exclude particular files other than resorting to //=require_directory and tree organization?  Perhaps something like //= require_tree ., {except: 'something'}...
Using coffeescript, jQuery, and sprockets in rails 3.1 the coffeescript files are compiled in to blocks like:  (function() {  var a;  var b;  var c;  foo = function() {    alert("foo");  }  bar = function() {   alert("bar");  }  }).ca...
I'm using rails 4 with foundation 5 and I'm having trouble getting javascript to work. Foundation's navbar menu doesn't drop down in mobile and I'm having trouble getting the jQuery datepicker to work. After a bit of searching on...
I am using turbolink (rails4) and following js link gets generated by application.js file in my pages header section  <script data-turbolinks-track="true" src="/assets/jquery.js?body=1"></script> <script data-turbolinks...
I'm using browserify-rails and I'm trying to get sprockets to preprocess a file that contains a sprockets directive, so that when I require() it using browserify, it will contain the generated JavaScript.  The sprockets directive tries to inc...
Ok, I've read a lot of information about the new Asset Pipeline for Rails 3.1 and I couldn't find a proper answer to my doubt.  I was loading my .js files according to the view#action I was rendering, on demand. I was doing this to prevent in...
In Rails 3 (Sprocket), is there a way to load a javascript file using a url to a remote site? For example, I want something similar to this in your .js file using the require directive,  //= require http://example.com/remote_file.js...
So, I just realised that I have absolutely no Idea what Sprockets are in rails.  when using either bootstrap, or materialize, it is requested to include the sprocket (bootstrap-sprocket or materialize-sprocket) in the application.js file.  Everything...
Supose i have this simple but fairly nested Eco template:  <div class="example">   <% for thing, i in @things: %>     <div class="nested">       <% if i % 2 == 0: %>         This block is fairly nested.       &...

Tags

Recent Questions

Top Questions

Home Tags Terms of Service Privacy Policy DMCA Contact Us

©2020 All rights reserved.