similar to: jQuery Rails Functions

Displaying 20 results from an estimated 1000 matches similar to: "jQuery Rails Functions"

2008 Dec 19
3
Delete All action
Hi, What is the best way to delete all members of a model? For example I have a tasks model and want to put a link in that will delete all tasks at once. Something like, @tasks = Task.all @tasks.each { |task| task.destroy } Do I need another action for this, and what should the link to it be? cheers, DAZ --~--~---------~--~----~------------~-------~--~----~ You received this message because
2008 May 07
2
Question on authenticity tokens
Does anyone find them useful? I can see them being good in some cases, but I have many exceptions that occur because of expired sessions. I am also not sure if they are really required for pages that require a login to access. The other place that they cause issues is in javascript requests. I am not using the built-in helpers, and all the javascript exists in separate js files. There is ways
2009 Jun 18
3
Date.new.to_time.to_i
What''s going on here!? >> Date.new.to_time.to_i NoMethodError: undefined method `to_i'' for Mon, 01 Jan -4712 00:00:00 -0800:DateTime from (irb):25 >> Date.today.to_time.to_i => 1245308400 >> RUBY_VERSION => "1.8.7" >> Rails.version => "2.1.1" (I''m not sure if this is a rails thing, or just a ruby thing) --
2009 Jun 08
4
how can i get attribute values from xml using libxml
Hi , i have xml document like this <?xml version="1.0" encoding="ISO-8859-9"?> <Root><Stk Category="601" Group="60101" Brand="001">.................... then i have to use Category attribute but reader class couldnt recognize attributes when i use these codes below for testing; while reader.read puts reader.node_type end
2009 Aug 28
4
InvalidAuthenticityToken
Hi guys What does the below line says ActionController::InvalidAuthenticityToken (ActionController::InvalidAuthenticityToken): -e:2:in `load'' -e:2 Please guide me -- Karthik.k Mobile - +91-9894991640
2009 Feb 22
8
dynamically changing a form from POST/CREATE to PUT/UPDATE
For the life of me I can''t figure this one out, although I can''t find anyone else who''s attempted to do this, and probably with good reason. Context: blog using AJAX What I''m trying to do: when the user initially saves a blog entry, or when auto-saving, I want subsequent saves to not create a new blog entry Why I can''t just reload the partial: -
2008 Jul 17
2
Problem with link_to_remote, RJS and jRails
Hi, everyone, I''m trying to update the content of a div using link_to_remote and RJS template. Everything works fine if I use the default Prototype/Scriptaculous libraries, but I want to use jRails ''coz other parts of my application use a lot of jQuery. Here are the steps I done: 1. inside StatesController.rb I defined the following action: def update_view # do nothing just
2010 Feb 22
10
Error: "ActionController::InvalidAuthenticityToken"
Hi there, I have my first Rails app running and I regularly get the following "logged_exception" error message: "ActionController::InvalidAuthenticityToken" Has anybody an idea what might cause this problem? Could it somehow be a "time out" error (like an "AuthenticityToken" which might expire after a certain time, or something along those lines)? Any
2008 Oct 10
17
authenticity_token sent, still InvalidAuthenticityToken
Hi! To send the authenticity token from flex back to the server, I followed this: http://blog.dt.org/index.php/2008/06/rails-2-flex-3-and-form-authenticity-tokens/ I have two controllers in my rails app. The method described in the link above works with the actions in one controller, but does not work with the other. The controller which does not work has just one action which performs a file
2009 Jul 28
6
how to set smpt server for our rails applicaion
hi i am using technoweenie-restful-authentication plug-in for authentication in my application. i want to send a activation link to the user''s mail-id. for that i need to set the smpt server for our rails application, for that i added the follwing code in config/environment.rb file ActionMailer::Base.delivery_method:smpt ActionMailer::Base.smpt_settings = { :address =>
2009 Apr 21
11
can we decrypt the cipher encrypted using Digest::SHA1.hexdigest
what i have done is as follows password = Digest::SHA1.hexdigest("#{salt}:#{password}") pass1 = Digest::SHA1.hexdigest("#{salt}:asdfgh") pass2 = Digest::SHA1.hexdigest("#{salt}:asdfgh") pass3 = Digest::SHA1.hexdigest("#{salt}:qwerty") puts pass1==pass2 puts pass1==pass3 This works fine but i need to get the decrypted password how can i get it any help is
2008 Apr 09
13
submitting an ajax form via javascript not rendering
for some reason the controller is parsing everything fine, but the return is a page instead of code execution. I have other ajax forms no listed that are also running fine on this same page. there are supposed to be 3 ajax events: onblur event that calls a function to submit - doesn''t work. There is a submit button at the end of the form - works there is a delete image that removed the
2009 Jun 14
6
Unable to make observe_field work
I can''t make it work. <%= text_field_tag :friend %> <%= observe_field :friend, :url => friendships_url, :on => :click %> <%= javascript_include_tag :defaults %> Raises the error:Can''t find variable Form. The generated html is: <input id="friend" name="friend" type="text" /> <script
2008 Mar 23
3
Nested Droppable divs -- drag & drop
I am having trouble with scriptaculous'' drag & drop here. I have a div that''s droppable, and two divs contained within that first div, each of which are also droppable. The containing (outer) div seems to grab all drops. Even though I defined the inner ones as "greedy" which is supposed to mean that draggables don''t propagate through. I read elsewhere that
2006 Feb 26
14
Question abour Draggables & Droppables
Hi, What I need to know is how to change revert:true to revert:false from a draggable after I drop it on a droppable so it doesn''t return to its original place. Something like: [CODE] <!-- Draggable image --> <img alt="Product" id="item" src="icon.png"> <script type="text/javascript"> new
2005 Dec 30
4
AJAX Drag and Drop Detecting Drop Coordinates
This one''s kicking me in the *(&#^. All I want to do is create a draggable item and then detect the coordinates where it is dropped. So my first approach was to just use the draggable_element with :revert => false, like so: <%= draggable_element "my_element", :revert => false %> That works great and lets me drag stuff all over the place. In the scriptaculous
2008 May 07
2
Inserting authenticity token into AJAX request params
Hi all. I am trying to find a way to insert an authenticity_token into the params of an Ajax request before it gets sent. I''ve got this much: Ajax.Responders.register({ onLoading: function(req){ if ((req.options.method == ''post'') && ! Object.keys(req.options.parameters).include(''authenticity_token'')){ ---->
2006 Feb 09
3
Draggables and Droppable performance (tips)
Hi all. I have some performance tips to share. I had been having problems with the overall performance of the drag/drop objects. This is due largely to the fact that my project really pushes the limits (potentially thousands of draggables and hundreds of droppables in the document at a time, although that is the extreme case). Something I discovered is that the performance of dragging goes WAY
2019 Sep 16
3
Handling of FP denormal values
Hi all, While reviewing a recent clang documentation change, I became aware of an issue with the way that clang is handling FP denormals. There is currently some support for variations in the way denormals are handled, but it isn't consistent across architectures and generally feels kind of half-baked. I'd like to discuss possible solutions to this problem. First, there is a clang
2015 Feb 26
4
Call for testing: OpenSSH 6.8
On Thu, 26 Feb 2015, Darren Tucker wrote: > I noticed this error log spam on the tinderbox when looking at one of the > failures. It happens with Unix domain socket forwarding is requested: > > debug1: channel 1: new [forwarded-streamlocal at openssh.com] > get_socket_address: getnameinfo 1 failed: ai_family not supported > get_sock_port: getnameinfo NI_NUMERICSERV failed: