Displaying 20 results from an estimated 58 matches for "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 thing with a form_tag, and I can''t get button_to to take a :disable_with option.
Any ideas?
TIA,
Bill
-------------- next part --------------
An HTML at...
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...
2007 Feb 24
2
RESTful PUT and button_to
..., :integer
end
end
def self.down
drop_table :counters
end
I''ve created a RESTful controller using the scaffold_resource
generator. In the "show" view, I''d like to put a link which
increments the counter by one:
<%= h @counter.content %>
<%= button_to "++", ??? %>
If this were a traditional rails app, the next step would be obvious.
I''d add an "increment" action to the controller:
CounterController
...
def increment
@counter = Counter.find(params[:id])
@counter.count += 1
@counter.sav...
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_option...
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 g...
2006 Jan 20
1
form_tag and multiple buttons inside problem
...;size'' => 8, ''maxlength'' => 8 %>
<table>
<tr> <th></th>
<th>Nombre</th>
<th>Descripcion</th>
</tr>
<% for p in @product.pieces %>
<tr>
<td><%= button_to ''Edit Piece'', :action => ''edit_piece'', :id
=> p %></td>
<td><%=h p.nombre %></td>
<td><%=h p.descripcion %></td>
<td><%= button_to ''Delete Piece'', :action =>...
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
--
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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@pu...
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 wan...
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
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
2006 Apr 04
0
Customized buttons for button_to()?
I wanted to use custom buttons, is there a way I can specify those?
--
Posted via http://www.ruby-forum.com/.
2006 Jan 22
6
Destructive behavior with link_to, button_to, :post=>true
...oing this is to use "submit tags"
within forms. But these aren''t well suited for inline behavior since
you can''t nest forms and they also have problems since they are blocks.
So, what''s the "right" way to do this? link_to with the :post=>true?
button_to (not my favorite due to the nested form difficulty)
Jake
--
Posted via http://www.ruby-forum.com/.
2007 Dec 28
1
Rake routes & console showing one thing, app doing another
...hings are good:
-------------------------------
complete_person_task PUT /people/:person_id/tasks/:id/complete
{:controller => "tasks", :action => "complete"}
-------------------------------
But then in my people/show view I have:
-------------------------------
<%= button_to "Done", :url => complete_person_task_path(task), :method
=> :put -%>
-------------------------------
Which generates this URL:
-------------------------------
http://127.0.0.1:3000/people/9?method=put&url=%2Fpeople%2F9%2Ftasks%2F95%2Fcomplete
-------------------------------...
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 rec...
2006 May 18
6
Form actions with additional parameters
...on => ''create'', next_step => true %>
<%= render :partial => ''user_form'' %>
<%= render :partial => ''community_form'' %>
<%= submit_tag "Optional Next Step" %>
<%= end_form_tag %>
<%= button_to ''Skip Next Step'', :action => ''create'', next_step => false %>
The form_tag should demonstrate what I intend to do. In the
corresponding ''create'' action of my controller, I want to redirect_to
different locations depending on params[:nex...
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 controller would want to render a view, and
I don''t want that to happen. I just want a particular action to occ...
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 (links), then comes the...
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 confirma...
2011 Jun 14
5
Buttons's routing
Hey
My app has some buttons and i have route all to different action
in router.rb file but click on each button results in same action. why?
Am i missing to specify anything...)
Rails:3.0.7
Thanks in advance.
--
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
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 a
f...