Displaying 20 results from an estimated 200000 matches similar to: "Customized buttons for button_to()?"
2006 Apr 19
3
Custom Form Buttons
Is there a way to deliver options for a custom form button to the submit
function?
As in:
<input type="image" name="submit" src="image.jpg" width="126"
height="18">
--
Posted via http://www.ruby-forum.com/.
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 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
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
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
2006 Mar 30
4
404 Error on dispatch.fcgi
I''m a java/php programmer trying out Ruby/Rails on my Dreamhost account.
I followed the wiki steps to the letter (2x now) and am still getting a
404 when I hit my dispatch.fcgi.
http://mydomain.com/public/dispatch.fgci
Can someone give me suggestions on how to debug this problem?
Here is my dispatch.fcgi file:
#!/usr/bin/env ruby
#
# You may specify the path to the FastCGI crash log
2007 Feb 24
2
RESTful PUT and button_to
I''m working on a RESTful app, and I''ve hit a snag. Here''s a
simplified example of the problem. (Excuse me if this example code
isn''t strictly correct; I''m typing from memory.)
Suppose I have a table which models a simple counter. It has a single
column, "count":
class CreateCounters < ActiveRecord::Migration
def self.up
2006 Mar 31
5
Changing Table Schema and Models
If I make a change to a database table, how do I recreate the model to
reflect the change?
--
Posted via http://www.ruby-forum.com/.
2006 Apr 08
2
Multiple submit buttons
Hi,
How do i differentiate different submits tags / buttons on one form. Say
I want to create an edit form and I want to provide two buttons; one to
save and one to cancel. I would have:
<%= submit_tag ''Ok'' %>
<%= submit_tag ''Cancel'' %>
How do I know which button get pressed by the user?
One more thing, how to specify the default selection in a
2011 May 28
0
Two buttons respond do same action.??
Hey
I am using rails 3.0.7.I created two buttons simply as:
<%= button_to "Great", :action => "click"%>
<%= button_to "click me", :action => "work"%>
Router.rb file looks like:
Check::Application.routes.draw do
# get "gne/clg"
get "posts/index"
resources :posts do
end
#get
2008 Apr 30
5
Quick Submit Button Question...
Hello,
Can I pass a variable from a submit button only? I have a form that the
user fills out and I need two different submit buttons - one for ''sync''
and one for ''full push''. I was thinking I could add some sort of param
to the button, but it''s not working... is there a way to do this? I have
this:
<%= submit_tag ''push to
2006 Mar 31
18
Modelling Foreign Keys
Can someone point me to a reference or tutorial that shows how to map
foreign key relationships in the model?
For example given:
Users
id
name
email
Posts
id
user_id
title
How do I associate user_id with users.id in the Post and User models?
has_many and belongs_to don''t seem to do it.
--
Posted via http://www.ruby-forum.com/.
2006 Jul 21
10
Using an image button for "link_to_remote"
All,
I want to do an AJAX request using a custom image button. I currently
have this as a standard button action using "button_to".
What I need is the button equivalent of "link_to_remote". Is there a
helper that I can use, or do I need to build it by hand?
I see button_to_function(), but that sets me up to call a Javascript
function, not post to a Rails action.
Or can
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"
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 Apr 04
2
Syntax Error in find()
Maybe I misunderstand the parameterization of find(), I am getting this
syntax error for
<% @choices = Choic
e.find(:all, :conditions => "question_id" = question.id, :order =>
"order") %>
---- ERROR LOG ----
ActionView::TemplateError (compile error
../config/../app/views/admin/test/show.rhtml:37: syntax error
_erbout.concat " "; @choices =
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
--
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