search for: _method

Displaying 20 results from an estimated 40 matches for "_method".

Did you mean: method
2010 Jun 25
0
Rails 3 data-method vs _method
Hi, I would like to know if and how new data-method attribute should work together with _method url parameter Please take a look at the following example: <a href="/players/13/logic_delete?_method=delete">Delete</a> A link to trigger action logic_delete and we should use REST delete method type. In Rails 3 with new UJS this will not work if javascript is enabled. To ge...
2006 Aug 05
5
RESTful Nesting issue
...ange issue with nested routes though, and was wondering if anyone could shed some light on this? If I have: map.resources :users do |users| users.resources :items end When I try to call <%= link_to_remote ''Delete'', :url => item_url(@item), :with => "''_method=delete''", :confirm => ''Are you sure?'' %> >From inside the user url http://localhost:3001/users/1/items Or edit_item_url(@item.id) it doesn?t always render the correct URL, and sometimes I get a nil error trying to render the url. Not sure what I?m missi...
2012 Jan 30
1
RCurl format
I am having trouble with the postForm function in RCurl. I want to send a the command DELETE https://somewebsite.com.json but I can't seem to find it. I could try: postForm(url, _method="DELETE", .opts = list(username:password) ) but I get the error: Error: unexpected input in " postForm(url4, _" this error seems to be due to the underscore "_" before "method" Any ideas how I can do a DELETE command another way in RCurl? Thanks....
2007 Apr 04
2
Simple RJS Calls Not Working
...y = ''none''; this.parentNode.appendChild(f); f.method = ''POST''; f.action = this.href;var m = document.createElement(''input''); m.setAttribute(''type'', ''hidden''); m.setAttribute(''name'', ''_method''); m.setAttribute(''value'', ''delete''); f.appendChild(m);f.submit(); };return false;\">Delete</a></td>\n</tr>\n"); } catch (e) { alert(''RJS error:\n\n'' + e.toString()); alert(''new Insertion.Bottom(\...
2010 Aug 17
2
[Form] Method POST & PUT problem
Hello, I have a form that should be a POST method, but Rails insist to put a hidden field "_method" that has the value "put" does anyone knows why? Thanks, David Sousa Controller: ------------------------------- def new @user = @current_user end ------------------------------------------- View: ------------------------------------- <% semantic_form_for @user, :url =...
2008 May 07
2
Question on authenticity tokens
...know. ------ $(document).ready(function(){ $(".photos img").draggable(); $("#trash").droppable({ accept: "img", drop: function(ev, ui){ var url = window.location + "/photos/" + ui.draggable.attr("id"); $.post(url, {''_method'': "delete", ''authenticity_token'': "need_the_users_token_here"}, function(){ $(ui.draggable).remove(); }); return false; } }); }); -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----...
2008 Jun 15
11
[PATCH] helper to create fb css stylized table
I attached a rails helper implementation of the fb_table described here: http://wiki.developers.facebook.com/index.php/Facebook_Styles I included testing and comments. I hope you find it useful. Curiously, it''s really a small extension of FBML. Richard -------------- next part -------------- Index: test/rails_integration_test.rb
2010 Jan 21
2
nested forms and attr_accessable
....rb attr_accessible(:description, :effective_from, :role_id, :superceded_after, :user_id) And this is what params looks like after the submit button is selected: {"user"=>{"id"=>"146"}, "commit"=>"Commit Changes", "_method"=>"put", "action"=>"update", "clearance"=>[{"id"=>"122", "description"=>"Just a test", "effective_from"=>"2009-01-01"}, {"role_id"=>"178", "effectiv...
2009 Feb 22
8
dynamically changing a form from POST/CREATE to PUT/UPDATE
...and evaluated javascript/jQuery to re-write parts of the form so that it would submit to my blog_entries controller and be treated correctly. So, I have to change the method from POST to PUT, which in rails means creating a hidden form element like so: <input type="hidden" name="_method" value="put" /> and then changing the form action from action="/blog_entries" to action="/blog_entries/21" - or whatever the id is of the newly created blog entry There''s also a little place in the onsubmit attribute that I''m also changin...
2007 Dec 04
7
REST bug with form_for
...@project), :html => {:method => :put}) do |f| %> The browser correctly gives <form method="post" action="/users/2/projects/1"> <div style="margin: 0pt; padding: 0pt;"> <input type="hidden" value="put" name="_method"/> </div> But yet when I hit the Submit button to update, I get this error: project_url failed to generate from {:controller=>"projects", :user_id=>nil, :action=>"show", :id=>"1"}, expected: {:controller=>"projects", :action=&gt...
2007 Oct 01
1
form urls and activeresource object
...to update it doesn''t work because it prints this in the html form: <form action="/articles/%23%3CArticle:0xb6951170%3E" class="edit_article" id="edit_article_1" method="post"><div style="margin:0;padding:0"><input name="_method" type="hidden" value="put" /> so rails thinks that my article id is "%23%3CArticle:0xb6951170%3E", any idea how to make it work? thanx in advance Pat --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed...
2008 Dec 14
0
jQuery post function
If you use jQuery to post data, what is the accepted best practice for passing parameters - by putting a query string in the url, or passing them through the data argument of the function? e.g. $.post(/tasks/3?completed=true;,{ _method: "PUT" },null, "script") OR $.post(/tasks/3;,{ _method: "PUT",completed: true },null, "script") cheers, DAZ --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rai...
2008 Mar 14
8
Facebooker updates
I just went through and cleaned out most of the bugs and patches. I also added a facebooker.js file that implements enough of prototype to do $() and link_to_remote with :update and remote_form_for with :update Let me know if you run into any issues with it. Mike -- Mike Mangino http://www.elevatedrails.com
2007 May 22
6
Ferret file not found error on item delete
...ing. What I''m trying to do is to just delete an item on a table that has been index. Here''s the error I''m getting: Processing GoalsController#destroy (for 68.83.170.192 at 2007-05-22 08:05:39) [DELETE] Session ID: ae7fa224cbeac580bac6fa4c9c250a03 Parameters: {"_method"=>"delete", "action"=>"destroy", "id"=>"105", "controller"=>"goals"} Ferret::FileNotFoundError (File Not Found Error occured at <except.c>:117 in xpop_context Error occured in fs_store.c:329 - fs_open_inp...
2013 Apr 05
3
Puppet Dashboard 1.2.23 issue deleting node
...ETE FROM `node_group_memberships` WHERE `id` = 53 RAILS_ROOT: /usr/share/puppet-dashboard Application Trace | Framework Trace | Full Trace Request Parameters: {"authenticity_token"=>"2LTYvT15OF9RXNjMXiDdVEGiXyCebbL3DNFgaamHMdk=", "id"=>"32", "_method"=>"delete"} Show session dump Response Headers: {"Cache-Control"=>"no-cache", "Content-Type"=>""} After downgrading to 1.2.22, we can delete the node again. Anyone else experience this? Stefan -- You received this message beca...
2012 Mar 28
0
[LLVMdev] GSoC 2012 Proposal: Python bindings for LLVM
...If you are familiar with C extensions for Python, you could guess that LLVMAddFunction should be defined in the low-level wrapper file *_core.c*. Let's find out how it is defined in this wrapper file? In *_core.c*, the following statements are what we are looking for. *static PyMethodDef core_methods[] = { ... /* Functions */ _method( LLVMAddFunction ) ... }* LLVMAddFunction is defined as a macro. Let's look at what the macro _method mean? It is defined in _core.c: *#define _method( func ) { # func , _w ## func , METH_VARARGS },* In the above macro, func is the name used in...
2008 Aug 19
6
redirect with application add
There are groups within our app that people can be invited too. If a user recieves an invite to a group and hasn''t yet added the application the filter chain ends up redirecting them to the main canvas page instead of the the group page directly. Is there a way to handle this if the user hasn''t installed the app, I tried redirect_back_or_default in one of my controllers but it
2010 Feb 23
11
Couldn't find without an ID
...ble trying to get a simple edit/update going. Everytime I hit submit, I get the following error: +++++++++++++++++++++ Couldn''t find Content without an ID Request Parameters: {"format"=>"#<content:0x4d3daac>", "commit"=>"Update", "_method"=>"put", "authenticity_token"=>"axBSuIWVTMRB2CKcmMO59tqtOlMtXRSXQQ7xeHEMd78=", "content"=>{"title"=>"About Us", "verbiage"=>"The company was formed in 2008 by seven healthcare professionals involved in...
2009 Jan 16
16
Testing arbitrary post action parameters
I am working on our (newly renamed) authentication feature. The current scenario is: Scenario: Non-administrators should not set administrator ability Given I have no users And I add a user named "admin" as an administrator And I add a user named "myuser" as not an administrator When the user named "myuser" authenticates And the user
2010 Sep 03
1
[PATCH] Adding some control over usages in the network creation/edition form
...} + }, + 'json' + ); + } + return false; +}); + +$('#delete_usages').click(function() { + var selected_ids = $('#network_usages_ids').val(); + + $.post( + "<%= remove_usages_path :format => 'json' %>", + { + '_method': 'delete', + 'ids[]': selected_ids + }, + function(data, status) { + if (data.success) { + for (id in data.removed) { + $('#network_usages_ids') + .find('option:selected[value='+data.removed[id]+']') +...