212 questions
- Bountied 0
- Unanswered
- Frequent
- Score
- Trending
- Week
- Month
- Unanswered (my tags)
0
votes
1
answer
653
views
access Stimulus JS from rails RJS
Is there a way how to access Stimulus JS controller action from Rails RJS view ?
e.g.:
//app/views/posts/create.js.erb`
$('#tags').hide();
I could do
//app/javascripts/controllers/...
3
votes
0
answers
627
views
How to replace prototype-rails gem when upgrading rails from 3 to 5?
I'm upgrading a rails project from 3.2 to 5.2. The docs in prototype-rails [github][1] say the support is not confirmed for Rails 4.1 and above. But right now, in the process of upgrading I'm still in ...
10
votes
2
answers
686
views
Hacking RJS behaviour in Rails 5
I have a old rails 2.x project that I have converted mostly over to rails 5.
One issue is some of my actions used RJS, so it looked like:
if request.xhr?
render :action => 'new_user' and return
...
0
votes
1
answer
164
views
RJS Dynamic update ActionView::Template::Error (undefined method `each' for nil:NilClass)
I am using Rails 4.2.6/PostgreSQL and trying to make dynamic update in index that has form and generate by scaffold. I think I am doing right but having issue with render partial via rjs. Bellow is an ...
user avatar
user2442202
1
vote
0
answers
57
views
How to convert existing rjs to use jQuery in Rails 4
Right Now, I have rails 2 application that I'm converting into Rails 4, I'm getting problem to understand rjs structure and unable to convert into jquery
This is my rjs code.
page << %Q(if ($...
0
votes
1
answer
58
views
r.js optimizer - building an all inclusive js with some modules, and some shims
When all the scripts are loaded individually, everything works like a charm. I am now trying to optimize.
However, because some of the .js loaded are shims, it just doesn't work, no JavaScript ...
0
votes
1
answer
46
views
How can I mix inline ruby code with my client side RJS?
I'm using PrivatePub and I'm experiencing some weird behaviour here. Before going through the details please note that I'm using Ruby 1.9.3 and Rails 3.2.2.
Let's say I have TestsController:
class ...
0
votes
1
answer
68
views
Rails2: RJS - Javascript events are not working when on page updates remotely
I am using RJS in my current project.
I have table rows with data and the last column contains a button, that binds javascript click function.
Now I have to do a AJAX and append newly created row to ...
0
votes
1
answer
42
views
Using javascript in variable in rails
in a model popup receiving a variable as question type id as '$('#subquestion').val()' based on this value the model popup content have to create,
model popup receiving the value but based on ...
0
votes
1
answer
105
views
Requirejs Optimizes multiple projects or pages
How can I optimize my multiple requirejs projects? For instance I have this structure below where I have two main.js in different locations/ folders,
build/
build.js
dev/
index.php
...
0
votes
0
answers
223
views
Contorller for ng-include partial undefined when minified
I tried to assign controller to navigation menu using ng-include directive. This works fine in development environment but when I minify javascript code NavigationController gives undefined.
Partial ...
1
vote
1
answer
378
views
Problems with Parallel.js/WebWorker and optimized code
I'm using rjs optimizer via grunt. I want to use webworker using the
Parallel.js lib, but I get syntax errors running the optimized code.
Comparison of optimized and unoptimized code:
See this gist ...
0
votes
0
answers
214
views
Understanding r.js optimizer for whole project
I have a directory structure like this:
assets
modules
module1
models
templates
views //contains individual modules
app.js
build.js
require.js
text.js
And here is my ...
2
votes
1
answer
325
views
How do I tell RequireJS to look in a subdir for certain modules?
I am not sure if this is possible, I've tried with a wildcard * in the paths config.
I want to load requested modules named jquery/* from subdir libs/jquery/src, but other files should be loaded in ...
4
votes
1
answer
602
views
Durandal Weyland/Requirejs optimizer with kendo ui dataviz
I'm building an app with Durandal to bundle with PhoneGap. When I'm trying to run the weyland optimizer I'm running into some issues.
The build and optimization runs fine without any errors (I'm using ...