similar to: Question on authenticity tokens

Displaying 20 results from an estimated 3000 matches similar to: "Question on authenticity tokens"

2008 Dec 06
9
jQuery Rails Functions
Hi, I was wondering if anybody who used jQuery with rails could help me out. I have a droppable that fires a simple function, shown below: $("#list").droppable({ accept: ".item", hoverClass: ''droppable-hover'', drop: function(ev, ui) { $(this).append("<br>Dropped!"); } }); But how could I get this to fire a Rails funciton in the
2009 Jun 09
3
protect_from_forgery doesnt protect from forgery
Maybe I am grasping the full usage of this protect_from_forgery function, but it does not seem to work for me. Imagine the following: A simple website with a user that needs to log in to do certain stuff and a closed off admin section that only certain users can access that have the is_admin field set to true. So to be clear, my User model has a login, password and is_admin. When displaying the
2010 Sep 23
1
undefined method `protect_against_forgery?' for #<ActionView
Hi guys This is a pretty tricky one. I get a "undefined method `protect_against_forgery?'' for #<ActionView::Base:0x569a3d4>" error when trying to generate a partial from ''outside'' the web site. I do this as I have a rake task that checks for changes periodically in the background, and if it then sees a change it rebuilds the partial and posts the result
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'')){ ---->
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
2008 May 02
2
making an element draggable after it's been dropped in a drop zone
Hi, I have this code which allows me to drop a draggable item in to a droppable zone. It works fine but what i want to happen is once the item ( droppable) has been dropped in to the drop zone (dropp) for the item to be draggable again. At the moment once ive dropped the item in the drop zone i can''t make it draggable again.....even if i repeat this line: new
2008 Jan 30
2
Invalid authenticity tokens when using subdomains
Does anyone have experience with using subdomains and rails? The example that I used to help me out was from the Advanced Rails Recipes book, but I can''t get it working as it should. I continually get authenticity token errors after logging in. I have had this error before, and for whatever reason after I added a<%= token_tag %> to the form it worked, but it doesn''t work
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
2007 Dec 23
3
InvalidAuthenticityToken problems with my login form
I am trying to convert my codeand to use the new Rails 2.0 feature RequestForgeryProtection but I get an InvalidAuthenticityToken error, right from the beginning with my login form.. I followed the recommandations : in my environment.rb config.action_controller.session = { :session_key => ''myappname'', :secret =>
2006 Apr 06
3
Drag and drop events. Or: How I learned to take over the world.
Hey all, First, I just want to say thanks to all of you who read, and email here frequently. So "Thanks". Second, I have a little pet project. This one has not timelines, and is mainly meant for my own personal growth and javascript goodness. It is a drag and drop game, and it may not be 100% possible to do everything I want with it. But that has not stopped me from
2006 Jan 25
8
RE: Make all LI items draggable
If you want the whole list draggable as one entity, you make one draggable. If you want each item draggable on their own, you need to make each one a new draggable. -----Original Message----- From: rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org [mailto:rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org] On Behalf Of
2006 Jun 14
4
Extend Draggable
Hello all, I want to extend a draggable object so it has one more attribute (type attribute, so I can distinguish different draggable types). Can anyone tell me how to do it? I''ve search throught the examples (like http://wiki.script.aculo.us/scriptaculous/show/ExtendClass) but I can''t seem to understand what I should do. Thanks for you help, H
2006 Aug 25
5
Dragging between DIVs with Prototype/script.aculo.us
Hi, I''m fairly new to script.aculo.us, so hopefully this is the right place to ask this question. I have the following situation (pseudo-code): <div> <Droppable 1> <Droppable 2> </div> <div (scrollable)> <Draggable 1> <Draggable 2> ... </div> Basically, my Draggables are inside a scrollable <div> element (the interface
2005 Dec 27
2
Drag and drop problem if Droppable zones overlap
Hello, The question is related to Droppables and Draggable. I''m creating a splitter component with a DIV that acts as the splitter and 2 DIV zones that are the splitted zone. To do so I use the Droppables and Draggable in conjunction. The splitter DIV is a Draggable component and I define 2 Droppable zones for the splitter DIV (Zone A and B on each side of the splitter) It works fine
2008 Dec 09
3
Rails noob confusion - HTML Form Post to Rails Controller?
I have recently been learning and trying to develop some application parts using Rails. One issue I may have is that one of the potential clients will want to have one of their external web pages POST to the Rails controller. I tried the naive approach - copy the HTML generated for the Rails controller action for doing the same POST (Create of a domain object). I had this working, or so I
2006 Mar 29
3
droppables
I am not sure how many of you are using draggables/droppables but I thought I would do some experimentation and try and learn how to use them on my own. Well, I have draggables, and I have droppables. I do have one question for now. The droppable onDrop event seems to pass in 2 objects, the dropped object, and the container the object was dropped on. My question is this, can I figure
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
2006 Apr 30
1
Draggable - how start action on start dragging and end action on droppping
Hi all. I have got situation that I made element draggable - and when element is dragged I want to start some action (e.g. shown AJAX indicator, and change one of CSS class in dragging element). What is the best way to achieve this? I search source code of the Draggable and I saw that there is 2 method: Draggable.initDrag and Draggable.endDrag so it looks like in initDrag method i should
2009 Oct 09
1
protect_from_forgery development mode
Should this be working in development mode? For some reason it doesn''t. regards, John
2005 Oct 11
8
Drag & Drop probs
Hi, I''m just trying out the possibilities of script.aculo.us / prototype having two problems... I have a draggable element with revert:false-property and two dropzones. (The draggables are in a <td> and the dropzones are <div>s if that is important.) 1. I want the draggable element to snap back to its original position when it gets dropped anywhere out of a dropzone. 2.