similar to: RESTful PUT and button_to

Displaying 20 results from an estimated 1000 matches similar to: "RESTful PUT and button_to"

2006 Jul 24
2
:disable_with for button_to ???
With form_tag submit buttons I use the " :disable_with => ''button label while processing'' " option so that visitors with slow connections aren''t able to submit forms twice. How do I do the same thing with button_to? I''ve got several pages where there are multiple forms on the page being updated with Ajax so I can''t wrap the whole
2006 Mar 25
5
button_to with image?
I''m trying to use button_to and have it use an image in place of the submit button. I had figured it would work the same as link_to like so: button_to(image_tag("editicon", :size => "16x16", :border => 0), :action => ''edit'', :id => person.id) but this instead displays the image code as the button name. Surely there is a simple way to
2008 Feb 12
0
button_to problem http://localhost:3000/art/151470;edi
hi all, now i am facing problem with button_to , it shows the path like http://localhost:3000/art/151470;edit instead of http://localhost:3000/art/edit/151470 the path is not displaying problem, so i got the error , no route found. in application_helper : def button_to(name, options = {}, html_options = nil) html_options = html_options.stringify_keys
2012 Aug 10
1
button_to with image
I''m calling button_to in my page, and it renders a form with a submit button just fine. But what I''d really like is <input type="img" src="myimage.png" .....> instead of <input type="submit...> button_to doesn''t seem able to do this, :type and :src parameters get ignored. Is there a way to do it? -- Tim Slattery
2006 Jan 20
1
form_tag and multiple buttons inside problem
Hi, I have a bit of a problem with a form in rails. Well, the problem really is me not fully understanding the mechanism of the form_tag, so here''s what i try to do: The idea is to present a some edit fields for some @product attributes and then present a table showing the @product.pieces (pieces for every @product) and to include a "Edit Piece" and "Delete Piece"
2010 Nov 06
0
multi lines in button_to
I am using ROR 2.2.2. In order to make my layout look a bit better I would like to put two words on a button label and have them on two lines. I tried to put a break in the label text but it just ended up as escaped html. Is there any way to put in multi-lines other than writing my own button_to helper? I couldn''t find any help in the documentation or on google. Thanks Norm --
2007 Sep 04
2
How can i add a confirmation dialog to a submit_tag?
When i use button_to or link_to, i can easily request a confirmation dialog with (for example) <%= button_to "Delete this story", { :controller => "story", :action => "delete", :id => @story.id }, :confirm => "Delete story: are you sure?" %> I also want to do this for the submit buttons on my forms, which are
2006 Jan 22
6
Destructive behavior with link_to, button_to, :post=>true
Hello- I would like to know what the suggested practice is for having multiple submit buttons on a relatively complicated input page. Let''s use the example of a Contact. There is lots of info there, including name, address, phone number. There is also a list of "contact associations" which can be modified on the same page. Ideally, the user could have one
2006 Jan 08
4
scaffold uses link_to for destroy
Hi, I wonder why scaffolding uses a link_to tag for the destroy links. Seems like these should be POST requests with button_to. The Rails book dedicates pages 335-337 to this very issue. Peter
2007 Dec 28
1
Rake routes & console showing one thing, app doing another
OK, I have a routing problem, that seems to be working in the console, and with rake routes but not in the app. I have people that have nested tasks, like so: ------------------------------- # routes.rb map.resources :people do |person| person.resources :phone_notes person.resources :documents person.resources :tasks, :member => {:complete => :put} end map.resources :tasks, :member
2006 Aug 18
4
Button on view
Hi, I have a page containing 3 views (2 are partials). One of the partials needs to have a button that will clear a table called "messages" in the database. I can put a button like this "<%= button_to "Clear Messages", :action => ''clear_messages'' %>" and have the controller do "Message.delete_all". But the problem is that the
2009 Dec 18
2
Undefined Method error - help request
Good morning All - I am working on a time tracking application as a learning excercise and have run into an error neither I nor Google can remedy. When loading my view, I get an error: ''undefined method ''true_class_path'' for #<ActionView::Base:......... Context: I have controllers for Project, Worktrack and ''Workbench'', among others. Workbench is
2008 Mar 07
2
Trouble using RESTful helper
Hi, I am trying to get into this REST thing, I have a nested resource whith the following route: ActionController::Routing::Routes.draw do |map| map.resources :members map.resources :clubs do |club| club.resources :members end map.connect '':controller/:action/:id'' map.connect '':controller/:action/:id.:format'' end Everything worked ok for this
2005 Nov 22
3
Idiom for submit button?
What is the rails idiom for submit buttons on forms? All other field types have helpers, but button_to creates its own form, so should not be used. I''ve looked in "Agile Web Dev. with Rails" but can''t see what I should do instead. Is this "difficult" because it runs counter to AJAX type forms? And, related, is there a way to ensure that hitting return in
2006 May 18
6
Form actions with additional parameters
Hiall, I want to give the action of a form an additional parameters but can''t figure out how to do it. My code looks like this <%= start_form_tag :action => ''create'', next_step => true %> <%= render :partial => ''user_form'' %> <%= render :partial => ''community_form'' %> <%= submit_tag
2010 Jul 06
4
how to make confirm boxes conditional?
Hi, I''d like to make the :confirm option in my link_to/button_to erb elements conditional. So, if the page is in some state, no confirmation is requested, but not otherwise, etc. So far, my only (ugly) approach is to replace the linker html itself depending on changes in state, but I believe there must be an easier way to ''toggle'' the confirmation option on/off. Can
2007 May 19
4
button_to_function with image?
Hi: does button_to_function allow the use of an image? I tried it in place of the text with "image_tag" and it doesn''t work. Maybe some form of button_to? Any direction you can give would be great! Mike -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups
2008 May 11
2
UnKnownAction exception
Hi all, i''m new in ruby on rails. i created a controller which has 2 views index, add_to_cart & inside index i created "button_to" which references to add_to_cart view, but when i click on this button UnKnownAction exception appear to me, i don''t know why this happen --~--~---------~--~----~------------~-------~--~----~ You received this message because you are
2005 Aug 28
8
Save and delete buttons: POST vs. proximity dilemma
I''m in a dilemma: In order to keep GET requests from deleting objects, I''d like to use the button_to helper to get "something" that generates a POST request. Unfortunately, that something is a form and forms can''t be nested. I''d also like to place buttons related to the same form close to each other. At the top are some navigational buttons
2007 Mar 23
11
Is there such a thing as button_to_remote?
I''ve changed my destructive link_to statements in favor of button_to. But what if I want to make an .rjs call with that button? Seems like we need something equivalent to link_to_remote, so that the button can make an ajax request instead submitting the form. Or am I missing the point entirely? Jeff --~--~---------~--~----~------------~-------~--~----~ You received this message