search for: authenticity_token

Displaying 20 results from an estimated 109 matches for "authenticity_token".

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''...
2008 Jul 17
2
Problem with link_to_remote, RJS and jRails
...Hello, World!<br/>" 3. inside show.html.haml (I really don''t like erb): = link_to_remote ''update view'', :url => { :action => :update_view } #result_view 4. here is what I get in log/development.log when using Prototype/ Scriptaculous: Parameters: {"authenticity_token"=>"60e55877a4b807f568824ed36c5849e95dc07607", "action"=>"update_view", "controller"=>"states"} 5. here is what I get in log/development.log when using jRails Parameters: {"authenticity_token"=>"60e55877a4b807f568824e...
2010 Jun 07
3
authenticity_token shows up in the url when page reloads
I''m pretty new to Ruby On Rails (and somewhat self-taught), so bear with me if I''m asking something stupid. So whenever I push my download button (which just uses send_file, if that''s any help) it reloads the page, without downloading, and it puts the authenticity_token in the url. This all the button is: <% form_remote_tag :url => { :action => ''download''} do %> <%= submit_tag "Download" %> <% end %> Basically, it''s just not working at all, and I would appreciate any sort of help with the issue. T...
2008 Aug 22
1
Adding style attribute to authenticity_token
Hi all ! Whenever I call form_for a div with margin:0 and padding:0 is created. Not only that is the default value in my application.css, I have no chance to override this attribute. In my application I display a list of items, using <ul> and <li>. Each li tag contains an form, which should be displayed in one line (as inline element). But I can''t set the div to
2009 Nov 01
0
Ajax calls in application.js (authenticity_token problem?)
Hi, I have a long list (~50) of items which should each be clickable and will send an Ajax request to the server. Now, each item will be calling the same action, just with a different id. Ideally this looks like a clear case of putting the Ajax javascript in application.js. It''s in one place, just call a single function onclick and pass through the id. However there are 2 issues: 1. I
2008 Oct 10
17
authenticity_token sent, still InvalidAuthenticityToken
...lers 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 upload. In this controller, if I don''t put "skip_before_filter :verify_authenticity_token" at the top, the file upload doesn''t work. I have pasted the upload action below: def upload_image directory = "public" + params[ :temp_Image_Location ].to_s pRandomFileName = params[ :random_File_Name ].to_s pFileData = params[ :Filedata ] vFilePath = File...
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: -
2009 Jun 09
3
protect_from_forgery doesnt protect from forgery
...ogin, password and is_admin. When displaying the user''s ''profile'', he can only edit his password. I dont want him editing his own login or ofcourse is_admin status for obvious reasons. Now when I use firebug and inspect the page, I see a neat little field containing the authenticity_token. But here it comes, When I edit the page in firebug, and add a field called user_is_admin and set its value to 1, and then submit, the changes actually go through!! I have now made myself and admin. Isnt protect_from_forgery supposed to protect from this? Obviously in the controller I have kept...
2011 May 16
2
Cannot get multipart => true , running well in my form when using remote => true
...ot; data-remote="true" enctype="multipart/form-data" id="new_clip" method="post"><div style="margin:0;padding:0;display:inline"><input name="utf8" type="hidden" value="&#x2713;" /><input name="authenticity_token" type="hidden" value="1ovVVdl+oh17phaR4ZVMc/ wZpL5v07YMBh+KsEqjTpk=" /></div> ... <p><input id="clip_image" name="clip[image]" type="file" /></p> <p><input id="clip_submit" name="commit" t...
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 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
2010 Feb 14
2
paperclip is making me crazy
...=>{"multipart"=>"true"}, "commit"=>" Save ", "ad"=>{"salesprogram_id"=>"3", "pic_1"=>"DSC01760.JPG", "active"=>"true"}, "action"=>"create", "authenticity_token"=>"-", "controller"=>"admin/ads"} But the SQL Insert for pic_1_file_name, pic_1_file_size, pic_1_content_type and pic_1_updated_at are all NULL and I''ve googled and flailed and googled and flailed but I cannot make this work. Can anyone toss me a...
2010 Sep 19
4
Rails 2.3.8 - InvalidAuthenticityToken problem. URGENT!
I used to have Simple Captcha installed, but since I removed it I got all kinds of problems with login. Processing UsersController#login (for 188.177.122.179 at 2010-09-19 12:21:09) [POST] Parameters: {"commit"=>"OK", "authenticity_token"=>"/ Y0aZETCsMhyI3CkrZJK6O2NaLEoi+LRe8ZuDPWU9kc=", "user"=>{"remember_me"=>"0", "password"=>"xxxxx", "screen_name"=>"rune"}} ActionController::InvalidAuthenticityToken (ActionController::InvalidAuth...
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
2009 Feb 10
2
form_remote_for NOT passing param: I want put and I get post
...px">Referencia</td> <td class="data"><%= f.text_field :reference %></td> <td><%= submit_tag "Añadir" %></td> </tr> </table> <% end %> In the development.log I only see the token param: Parameters: {"authenticity_token"=>"c5fb066b9a3370e15f94154cc2140759d40f079c"} the html source code is this: <form action="/expedients/create_ajax" method="post" onsubmit="new Ajax.Updater(''div_listd'', ''/expedients/create_ajax'', {asynchronous:true...
2008 Feb 24
3
1 error(s) on assignment of multiparameter attributes
...expiration(2i)"=>"2", "last_name"=>"", "login"=>"", "password"=>"", "card_expiration(3i)"=>"1", "email"=>""}, "commit"=>"Sign up", "authenticity_token"=>"c4952d3607e216e85ca0ca4b76eb65272d1f85f7"} --~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TL...
2010 Feb 22
10
Error: "ActionController::InvalidAuthenticityToken"
...re after a certain time, or something along those lines)? Any idea how that error could be prevented from occurring? The "backtrace" always starts like this: ================= /usr/lib/ruby/gems/1.8/gems/actionpack-2.3.3/lib/action_controller/request_forgery_protection.rb:79:in `verify_authenticity_token'' /usr/lib/ruby/gems/1.8/gems/activesupport-2.3.3/lib/active_support/callbacks.rb:178:in `send'' /usr/lib/ruby/gems/1.8/gems/activesupport-2.3.3/lib/active_support/callbacks.rb:178:in `evaluate_method'' /usr/lib/ruby/gems/1.8/gems/activesupport-2.3.3/lib/active_support/ca...
2009 Mar 31
2
Safari 4 invalid auth token
Getting an odd error in Safari 4: Here''s the auth token that''s output to my javascript: 4HB8yAW4gU2xEavWOc+kiMoj4XIyCBUK/t704aOQ+co= Here''s what''s listed in the parameters: "authenticity_token"=>"4HB8yAW4gU2xEavWOc kiMoj4XIyCBUK/t704aOQ co=" notice: the +''s are being replaced by spaces. This a specific safari issue? I haven''t even been able to get FF to give me +''s in my auth token. ~ m --~--~---------~--~----~------------~-------~--~----~...
2008 Apr 09
13
submitting an ajax form via javascript not rendering
...ript> ..... <form action="/assignment/update_assignment/16" id="frm_16" method="post" onsubmit="new Ajax.Request(''/assignment/update_assignment/16'', {asynchronous:true, evalScripts:true, parameters:Form.serialize(this) + ''&amp;authenticity_token='' + encodeURIComponent(''***'')}); return false;"> <div style="margin:0;padding:0"> <input name="authenticity_token" type="hidden" value="***" /> </div> <input class=''reg_c'' value=&...
2012 Feb 07
2
save method (create action) saves twice
...in the command console where the rails server is up. They seem similar to each other, but two separate SQL actions. Started POST "/scripts" for 127.0.0.1 at 2012-02-07 19:17:53 +0900 Processing by ScriptsController#create as JS Parameters: {"utf8"=>"✓", "authenticity_token"=>"xxx+gv5Cr9GjC0UpqfH89qgnRii4=", "script"=>{"video_id"=>"1", "startp"=>"0", "endp"=>"20", "text"=>"This is a test!"}, "commit"=>"save"} SQL (0.7ms)...