similar to: How to access controller's instance variable in a js.erb loaded by javascript_include_tag?

Displaying 20 results from an estimated 2000 matches similar to: "How to access controller's instance variable in a js.erb loaded by javascript_include_tag?"

2007 Oct 05
9
Rearchitect the new :cache feature of javascript_include_tag, similar to ToolbawksPacker
I have done some work with the javascript and stylesheet helpers for ToolbawksPacker.. http://svn.toolbawks.com/toolbawks_packer/trunk/ Which more/less takes all executed javascript_include_tags and stylesheet_link_tag on any converged view (combines all partials and such) and builds a list of js and css files respectively and uses that to form a cache. In additon, it also minifies the JS using
2008 Oct 31
2
Stubbing #javascript_include_tag in a helper spec
When writing specs for a helper method, how do you set an expectation for #javascript_include_tag ? describe NeighbourhoodsHelper do describe ''#initialise_map'' do it ''should include the "foo" JS file'' do # expectation here helper.foobar end end end I''ve tried replacing "# expectation here" with the
2012 Oct 29
6
export variable from bash to R
Dear R experts This probably seems very easy to you guys, but I'm a beginner and would be really glad if someone helped me with this: I am trying to automate the execution of an R script (let's call it "myscript.R") by passing a variable from a bash script to myscript.R. I know I can use the command Rscript, but I don't know how to declare in bash which variable will be
2005 Feb 25
3
passing command line arguments to 'R CMD BATCH myScript.R'
Hi Community, I have a question about how to pass command line parameters to R script running in the batch mode. The problem is: there is a banch of data files which are to be processed by R script called from a web-server, i.e. in the batch mode. The web server generates data files and passes their names calling 'R CMD BATCH' one by one for every file. Now the question is how to
2011 Aug 10
3
javascript_include_tag error
<!DOCTYPE html> <html> <head> <title><%= @title %></title> <%= csrf_meta_tag %> <%= javascript_include_tag "http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js", "jquery.rails.js" %> <script type="text/javascript"> ...app/views/layouts/application.html.erb:7: syntax error, unexpected
2011 Sep 07
1
process id of an R script
I have a script that runs as a cron job every minute (on Ubuntu 10.10 and R 2.11.1), querying a database for new data. Most of the time it takes a few seconds to run, but once in while it takes more than a minute and the next run starts (on the same data) before the previous one has finished. In extreme cases this will fill up memory with a large number of runs of the same script on the same data.
2007 Oct 11
2
relative_url_root and javascript_include_tag
Hi. In my environment.rb, I have: ActionController::AbstractRequest.relative_url_root = "/foobar" In my layout, I have: <%= javascript_include_tag :defaults %> Question 1: I am getting an error: ActionController::RoutingError (no route found to match "/javascripts/prototype.js" with {:method=>:get}): When I remove the relative_url_root, everything works great.
2011 May 26
8
Is there a way I can create a sub-layout with ERB?
I have 2 pages that have almost the same content except for stuff in the middle. I''d basically like to have a sub-layout that wraps the content that is different - exactly the way a normal layout file would. How can I call into a layout inside of erb? I''d like to do something like this: <%= render :sub-layout => "reusable-wrapper" %>
2013 Aug 27
1
return the name of source.
Is there a fuction that will allow me to retrun the filename for a script from within that script. fir instance If I have a script "myscript.r": FileName<-unknown.fucntion() print(FileName) and run it source("myscript.r") will return "myscript.r" Thanks Nevil Amos [[alternative HTML version deleted]]
2011 Mar 09
1
&quot; instead of " in js code rendered by erb
Having problems rendering javascript in erb file. Thanks for suggestions. //layout erb file (function() { ... var widget_properties = {}; <%= content_for?(:extend_widget) ? "widget_properties = " + yield(:extend_widget) : '''' %> ... })(); //view erb file <% content_for :extend_widget do %> extend = { _init: function() {
2006 Dec 11
3
javascript_include_tag -- time stamp
Using, for example, <%= javascript_include_tag ''prototype'' %> results in <script src="/javascripts/prototype.js?1164912447" type="text/javascript"></script> I take it the number 1164912447 is the timestamp of the file (in seconds since the epoch) Isn''t it redundant to include this information? Isn''t part of the HTTP
2010 Nov 02
2
get the scripname within the executed myscript.r
Dear R-users! Is there a way to obtain the name of the executed myscript.r, i.e. when cmd> rscript myscript.r is executed? (The name of the script in this case is "myscript.r") Here is the explanation of why I would like to get that: Why: I have prepared a set of scripts (decompose_data.r, plot_with_higher_resolution.r, plot_3D.r, etc.) placed in a root directory at one place. I
2018 Sep 28
4
Simple bash question
I am calling a bash script and passing in somestring that includes a "$" myscript "$plusmore" I want to assign in the myscript the $1 arg to something like MYTEXT="$1" when I do that I dont get what I'm expecting. if I do MYTEXT='$1' I still dont get what I'm expecting. On the first assignment of MYTEXT I do not want the "$" to be
2008 Oct 23
1
ManageSieve textual fronend wanted
Is there some simple textual frontend to the ManageSieve protocol somewhat easier to use than gnutls-cli? I.e. something to use like managesieve -u ef putscript myscript < /tmp/myscript Password: managesieve -u ef setactive myscript Password: simply doing the TLS authentication and length computation for me.
2018 Oct 17
2
dovecot passdb driver=checkpassword as external script for block ip
Refer to https://dovecot.org/pipermail/dovecot/2015-March/099971.html https://wiki.dovecot.org/PasswordDatabase I tried to repeat the same thing. Set these passdb: passdb { args = /myscript.sh ip=%r driver = checkpassword result_failure = return-fail result_success = continue } passdb { args = /etc/dovecot/dovecot-sql.conf.ext ( my working auth method ) driver = sql } Created
2004 Sep 08
2
'Hangup' not hanging-up, is this intended behaviour?
Greetings folks; I have a bit of a conundrum, and I can't tell if Asterisk is doing something daft, or whether I'm clean missing out why it's doing what it's doing. So, I have a dialplan that looks a little like this: -------------------- [start] include => dids include => everythingelse [dids] ; Test exten => 8378,1,SetCallerID(3015551212) exten => 8378,2,Hangup
2017 Jan 30
2
No subject
Hi, I am trying to give access to sshd port 22 to connect to different port 1023 by differentiating with special user, customuser. Following is how i tried, but it doesnt work, please suggest. outside, user issues command ssh customuser at ip, it fails inside sshd_config, i wrote the following: Match user customuser ForceCommand . /etc/myscript inside myscript, I do the following: read
2006 Jun 20
4
Prototype $A not defined
Hello, I apologize for posting prototype related email to this list, yet I have not seen any reference to email or list on the prototype web site and I know the author of that library is part of the rails development team so I am trying to reach him. Basically I have installed "FireBug" which is a javascript/html/css/dom debugger for firefox and since I plugged prototype.js and
2012 Aug 10
1
question about windows Rgui.exe startup
Hi all, I had a specific question about the loading of objects into R. I apologize in advance if I have overlooked anything in the manual but as far as I can tell I have yet to find a solution to my problem. I am on a Windows platform. So what I am trying to do is have R read in a binary file on startup from the Windows system command line and startup Rgui.exe with these options without
2001 Oct 08
1
Yet another batch mode question
Hello all and thanks in advance, I know you can start R with either: 1. R CMD BATCH myfile.R or 2. R < myfile.R My question is this: what if I want multiple input files and/or command line arguments. For example, under unix you can run a script command (in a shell language, perl, or python) like: python myScript.py or better yet, if you have things set up right, you can place a