link-to-remote

Passing object from view to controller

Is there a way to pass a object, specifically a form_builder object used in a view, to an action in the controller? I am using a link_to_remote and want to update a variable in the controller and then add a new nested form element to my form via a render :update block. If I pass it as a param, it gets converted string and I can't seem ...

How do I get a Rails link_to_remote tag to make a DELETE request when JavaScript is disabled?

I'm using the following code as a link to delete a todo in a simple todo list application I'm making: <%= link_to_remote 'delete', {:url => complete_todo, :confirm => 'Are you sure?', :method => :delete}, { :href => url_for(complete_todo), :method => :delete } %> It works fine when JavaScript is enabled, but when it's disabled it make...

(Rails) Using "link_to_remote" in conjunction with a popup/popout window...?

Hi All, What is the most straightforward mechanism by which to "link_to_remote" and popout a window with the data? I need "link_to_remote" because I need to pass certain data along with the url without redoing my routes. If this would be better served by a "link_to" without the need to redo my routes, I'm all for it. I simply can't g...

(Rails) How do you replace the text of a "link_to_remote" without breaking the link?

Hi All, Is there a quality way to update the text inside a "link_to_remote" and leave the link functional? Basically I have two links: <%= link_to_remote "(#{building.charts.size} Charts)",{:url => {:action => "update_chart_matrix", :chartable_type => "building",:chartable_id => building.id, :title => building.name}, :update => 'ch...

can we have :update and :rel(html option) together in a link_to_remote tag

I have link_to_remote tag.I want to update a div.The div name is specified in the form of :rel ( need to do in this way).Can we use link_to_remote so that we can specify :rel and :update. Have any idea? Please help me. ...

remote_form_for in rails with the :with option

Is it possible to use the :with option with remote_form_for? It works with link_to_remote, and the api docs seems to indicate :with should work with any of the remote_ methods. Here is the code I'm using, and output it's producing: Link_to_remote (works): = link_to_remote 'ARGH', {:url => {:action => 'load_item', :id => @policy.i...

rails how to call another controller in link_to_remote

how to call a different controller's action using link_to_remote :url => {:controller => "Posts", :action => "update"} doesn't work ...

Missing template after link_to_remote

I'm using link_to_remote to update a partial on my page. The problem is that Rails isn't finding my partial. I am specifying the full path to my partial(an html.erb file) in the controller method: def my_method create something render :partial => '/shared/partials/my_partial_form', :layout => 'false' end I know the controller met...

conditional :confirm in link_to_remote

Hi. I have a Rails app where I was doing a general delete dialog with "are you sure" before it gets deleted. That's all fine, but I also have a small ajax on click to remove the block containing all the information. The block gets removed no matter what which makes things confusing. I couldn't seem to find any documentation online on how...

Strange routing problem in link_to; gotta be something simple

My brain is fried trying to squeeze some work in before the holiday. I'm trying to fix a simple bug. The URLs that the following link_to_remote is creating are wrong: options = { :url => { :controller => 'favorites', :action => 'resort', :params => params.merge({:sort => key, :method => method})}, :update => 'favorites' } html_...

Link_to_remote with Nested Routes

I'm trying to figure out how to structure my path on a link_to_remote tag to accommodate nested routes. I have an article model that belongs to a group model, and the article has votes associated with it (using the Vote_Fu plugin). I created the code for articles first and it worked, but in the process of adding the group model and updat...

Is there a :disable_with equivalent for link_to_remote?

I have a link_to_remote and I want to make sure people can only click it once while waiting for it to return. Is there a good way to disable it after someone clicks it? (Changing the text of the link is nice too, but I want to disable it also to be sure). This is Ruby on Rails btw. ...

Issues using a link_to_remote to change the state of the database?

hi, anyone know of any issues using a link_to_remote to change the state of the database? I'm taking about issues with spiders, google accelerator etc. Twitter seems to do it with no problem. Thanks ...

link_to_remote in rails, problem pass :id

i have problem use link_to_remote link_to_remote document example say link_to_remote "Delete this post", :update => "posts", :url => { :action => "destroy", :id => post.id } this code make below html code <a href="#" onclick="new Ajax.Updater('posts', '/blog/destroy/3', {asynchronous:true, evalScripts:true}); return false;">Delet...

Symfony problem with jq_link_to_remote

Hy, I'm using jq_link_to_remote function to load in a div a form to do answers to a comment (like in facebook). My problem is that i call this form like that 'social/respond/id/14' where id content the parent opinion. I create a funcion that setValue to a hidden field in my form. Then, why if i try to call directly 'social/respond/id/...

jquery onclick function not firing with rails link_to_remote

In the js file of the page, inside $(document).ready(function() {}) I have $(".school a").live("click", function (e){ e.preventDefault(); ....; jsFunc(param1, param2, param3); }); Now the div with the class school has tags generated by rails link_to_remote with :url, :action, :before, :html. On clicking on this link it does...

How to :update after :success with link_to_remote Rails method?

Hi, I'm trying to get two things done after a user clicks on a link: Delete a div Add another element at the bottom of the page I played with Rails link_to_remote and what I get with the code below is that the element is added before the div is deleted: <%= link_to_remote "&#x2713;", :url => { :controller => :movies, :act...

How do I use link_to_remote to pass then render a partial in rails?

I want to create several link_to_remote links that are campaign names: <% @campaigns.each do |campaign| %> <!--link_to_remote(name, options = {}, html_options = nil)--> <%= link_to_remote(campaign, :update => "campaign_todo", :url => %> <% end %> I want the output to update on the page to render ...

Expanding a row in a div-based table

I have a stack of <div> elements that show a name. I'd like to include a + link off to the side of each <div> that, when clicked, expands the <div> and adds more detailed information (from a RoR controller). After poking around on the net, I found link_to_remote and related RoR stuff, but I can't seem to get the right combination to wor...

How do I use link_to_remote with a form as the remote URL?

I want to render a form (fields and includes a submit button) when using link_to_remote -- the form appears via an ajax call. I'd like that form to behave as any other form would (it's a basic New Active Record) form, nothing fancy. Upon submit, though, I'd like the original parent page to remain static without refreshing and, instead ...