rjs Questions

2

Solved

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 retu...
Rind asked 16/8, 2017 at 2:26

3

Solved

I've seen "RJS" and "RJS templates" mentioned in passing in blog posts and tutorials. I did a search, but I'm still unsure about it. Is it a technology specific to Rails, rather than a standard lik...
Gunilla asked 19/1, 2009 at 23:43

2

Solved

I'm working to setup an AJAX action in rails 3 with the following code. The AJAX part of the code seems to work, but it does not request the correct file and my respond_to serves it the regular HTM...
Faustinafaustine asked 29/12, 2010 at 15:17

7

I have some values in ruby (variables and objects / hash) that I want to pass on to javascript on the rendered page. Currently I use these methods to simply write the javascript of declaring the va...

4

Solved

Say I need to call a javascript file in the <head> of an ERb template. My instinct is to do the usual: <head> <%= javascript_include_tag :defaults %> <!-- For example --> &...
Sunstone asked 23/12, 2008 at 21:48

6

I can't believe I've been looking four hours for this simple task, but I have. In Rails 2.3, I could replace one section of a page with this simple code: render :update do |page| page.replace_h...
Stentor asked 25/10, 2010 at 15:45

2

Solved

I'm following the book Pragmatic Agile Web Development With Rails 4th Edition, BUT I'm using Rails 3.2.2 instead of 3.0.5 as recommended in the book: ~$ ruby -v ruby 1.9.3p125 (2012-02-16) [i686-l...
Multiracial asked 13/4, 2012 at 20:50

4

Solved

I'm working with an application built in Ruby on Rails with very poor error handling right now. If a controller method is executed via ajax, and that method results in a 500 (or 404 or any other re...
Rhnegative asked 6/3, 2009 at 19:24

1

Solved

I am trying to improve my knowledge of Rails. I was trying to use js.rjs in a simple code. Here's the view: <div style="background: #000080; font-weight: bold; margin-left: 30px"><p>T...
Ataxia asked 15/3, 2011 at 2:1

1

Solved

I have an event form with some nested attribute models. The additional models are rendered after a client is selected from a select box. An observer watches and calls a controller action which rend...
Hokkaido asked 7/10, 2010 at 12:24

3

I want to display a modal window with an error message, when the user has entered something invalid in a form, but render another action if everything is OK. However, when I try to display the moda...
Asteriated asked 17/5, 2010 at 14:4

2

Solved

I use the rails 3.0.0.beta Is there any new syntax to write RJS, here is an example def remote_create @photo = Photo.new(params[:photo]) respond_to do |format| if @photo.save # add @photo's...
Unconscionable asked 13/3, 2010 at 17:45

5

Solved

I've used RJS in the past for RoR projects and felt terribly constrained by what it could do. However, using Javascript alone felt/feels ugly and hack-y. This is particularly true when writing Java...
Diapositive asked 20/12, 2009 at 4:30

3

Solved

I am trying to implement something seemingly very simple, and I have been beating my head against it for days at this point. My desired end result is a Country select drop-down, tied to a State se...
Oriole asked 10/6, 2009 at 15:3

7

Solved

I heard a bunch of rails developer saying that RJS is evil. I've never used it since I always managed to do what I wanted using classic javascript or jquery so I didn't pay attention. Now I'm getti...
Minaminabe asked 17/11, 2009 at 17:34
1

© 2022 - 2024 — McMap. All rights reserved.