similar to: Where did UJS go? UJS vs. RJS

Displaying 20 results from an estimated 10000 matches similar to: "Where did UJS go? UJS vs. RJS"

2007 Feb 14
5
FormTestHelper should change hidden fields
Railsoids: FormTestHelper rules. It tests your response.body form at the same time as it triggers your action, with all the parameters in that form. This obviously improves quality. But it took issue with this: submit_form ''validate_stuff'' do |form| form[''IBhidden''] = ''validate'' end The field IBhidden is a hidden field. To be
2011 Sep 06
8
Ajax and rails 3 UJS (jquery)
Hi, guys, I''m in the midst of moving an app from rails 2.3.8 to rails 3.0.9. Sadly, rails 3 no longer has javascript generators and I''m now forced to do more javascript. For my project, I have selected jQuery as the javascript framework for my rails 3.0.9 app. What I have done to have my app''s deletion link (for each item) trigger an alert box when the deletion
2011 Jul 27
20
Rails, jquery and Ajax
How do I make an ajax call and then update a div with a partial? I''ve tried this but it''s not working. Comment is created but the partial is not loaded. //view <a href="#" id="testlink">Testlink</a> <div id="commentlist"> </div> //controller def new @comment = Comment.new @comment.save
2013 May 31
11
A simple javascript alert not working
If I have a file in view /test called index.js.erb and in it a simple alert("hello") shouldn''t that run when I go to /test/index? It doesn''t. -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To unsubscribe from this group and stop receiving emails from it,
2007 Mar 05
2
Help with rjb
I am trying to do file i/o with rails and rjb and can''t figure out a way to make this work. Here''s what I am trying to do: - a user uploads an image to the server via a standard html form: <%= file_field("blog", "attach") %> - this returns a ruby File object to the controller in params[:blog][:attach]
2011 Jan 15
3
respond_with javascript
My ajax stopped working when I switched to using respond_with. For my Votes, I have the create action and the corresponding create.js.erb, and respond_to :html, :js, :xml in the controller. Heres the log when I try and create a vote: Started POST "/stories/3-asdfasdf1111/votes" for 127.0.0.1 at Fri Jan 14 20:46:36 -0800 2011 Processing by VotesController#create as */* Parameters:
2013 Nov 28
74
Remove :js responder
https://github.com/rails/rails/issues/12374#issuecomment-29446761 Here in discussion I proposed to deprecate JS responder because this technique is insecure and not pragmatic way to transfer data. It can be exploited in this way http://homakov.blogspot.com/2013/05/do-not-use-rjs-like-techniques.html i find this bug very often so i know what i''m talking about. With it attacker can
2007 Jan 16
4
RJS - What the the advantages? / Why use?
Hi, I''ve read up on RJS and understand the concept/how-to-use. It''s still not clear in my mind when and why to use RJS? Can anyone drop in a couple of bullet points re advantages + when/why would RJS make sense? Thanks --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails:
2008 Jan 03
1
render :update do |page|
I was wondering if anyone knew how to do the rails equivalent of render :update do |page| It looked like maybe render_inline would do. If that''s it - does anyone have an example? Has anyone ported the scriptaculous helpers to a merb plugin yet? Also - is there anyway to search the mailing list archives? Sorry for the newb questions. Looks like a great framework though! -ben
2013 Oct 02
2
Rails 4 ujs button only works after second click
Here''s the code https://gist.github.com/dasibre/6786245 *new.js.erb file has the following js code* $(''a.pinbutton'').on(''click'', function() { $(this).parent().append(''<%= escape_javascript(render("select")) %>'') }); *here''s the player index with the new link* <%= link_to "Pin",
2006 Nov 28
11
New Rails Site: Wordie
My latest stupid web trick, built, with love, in Rails: http://wordie.org Make lists of words. See who else likes the same words. Basically, it''s a dating site. Built on thanksgiving while half-watching football and launched yesterday. In other words, half-baked, but I thought some of you might find it mildly amusing. John ____________________________ John McGrath Squirl: a site for
2006 Dec 08
2
UJS plugin incompatible with RSpec?
Hi all, Anyone using UJS with RSpec? I have the following view spec: ---- edit_spec.rb context "accounts/edit" do fixtures :users setup do assigns[:user] = users(:consumer) end specify "should display the user info to edit" do render ''/accounts/edit'' end end ---- end that causes this exception: ---- exception ActionView::TemplateError
2006 Dec 05
5
Render :update and script tags
Hi All! I''m kind of new o ruby so please apologize my stupid questions on advanced... I''m using render :update do |page| page.replaca_html :element , :partial => ''apartial'' end This is working well, since I see in the page the following code: try { Element.update("element", ""); } catch (e) { alert(''RJS
2006 May 05
6
RJS implementation question
Why is RJS so dependant on programatic creation of Javascript? RHTML is a great implementation in that it puts HTML first, and Ruby second. I would have thought RJS would be the same way: a .js with ERb helpers for generating Javascript functions. RJS putting Javascript second means: - I have to learn a whole new set of commands to use Scriptaculous. - Developers have to constantly chase the
2007 Feb 04
10
where to install script.aculo.us ?
I''d like to try autocompletion, and my understanding based on AWDWR:2, and on various website tutorials, is that I should install the script.aculos.us javascript library. My question is how to do that. The instructions on their site tell me to "Put prototype.js, scriptaculous.js, builder.js, effects.js, dragdrop.js, slider.js and controls.js in a directory of your website,
2006 Apr 22
3
rjs woes, any hints?
I''ve pared my rjs experiment down to what seems a bare minimum. When I click on my link_to_remote, the rjs executes, returns the correct javascript to the browser, but it doesn''t update the div I''ve specified. What appears to be coming back from the controller is: Element.update("my_form", "hello, rjs"); I''m tearing my hair out.
2006 Apr 16
11
RJS templates not found
I am running Rails 1.10 and wanted to check out the RJS templates. Rails doesn''t seem to find them. I did issue the rake comment update_javascripts and that did not correct the problem. RJS is part of 1.1 right? Any ideas? Thanks. -- Posted via http://www.ruby-forum.com/.
2008 Dec 03
2
Rails functional test how to assert json result?
As title, I want to have my functional test check results from a json render result, how can I achieve this? --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this
2008 Mar 17
9
Render index view and RJS on load?
Hi, I''ve searched for a while online and been unable to find anything concerning this. I have a controller with an index action, which has an index view. This view renders the index page but also needs to execute some javascript to show some data (using effects) when the page loads. I thought I could just create the view and RJS with the same name and the RJS would be run after the
2008 Aug 24
11
link_to_function check javascript attribute
How could I check the value of an javascript object''s attribute? <div id="new_item_details" style="display:none"></div> <%= link_to_function("Show details...", nil, :id => "show_details") do |page| page.visual_effect(:toggle_blind, :new_item_details) if (page[:new_item_details].style.visibility ==