Displaying 20 results from an estimated 2000 matches similar to: "Submit_tag question"
2006 May 22
3
Best Rails API source
Folks,
Is api.rubyonrails.com the best source for RoR API info? Do any other formats exist, that are easier to navigate/search?
Thanks,
Marcus
Marcus Blankenship
Technology Services - Software Group
JELD-WEN, inc.
Information Systems
541-882-3451 x 2558
marcusb@jeld-wen.com
RELIABILITY for real life*
This correspondence is for the named person''s use only. It may contain
2006 May 18
6
NOOB: Second post, please help...
Folks,
I am linking from page A to page B, and back again. When I go from A -> B, the B_controller.rb runs fine, and the page renders properly. But, when I go from B -> A, the A_controller.rb doesn''t run again, so the array (@A) is nil (which causes a problem).
Should the controller run each time the page is accessed? Any ideas?
Marcus
Marcus Blankenship
Technology Services -
2006 May 17
2
NOOB: Passing parameters between pages
Folks,
I have a rhtml page (page A) that links to another page (page B), and I
want to pass some parameters from page A to page B.
Here is the link code (on page A):
<%= link_to ''Edit'', { :action => ''edit'', :id => permit }, :post => true
%>
If I want to pass a parameter "name" and a value "marcus", and pick it
up on page
2006 Jul 08
4
Hidden fields in forms
Please can someone show me the correct syntax for a hidden field in
forms, this is my code
<%= start_form_tag :action => ''create'' %>
<div class="form1">
<table width="auto" boader="8" cellspacing="5" cellpadding="5">
<% hidden_field ''line_item'', ''client_id'', :value
2006 Mar 05
1
Help with Self-Referential HABTM
With the help of the Rails Recipes have got a self-referential HABTM
relationship working, but I''m really struggling with getting a new entry
from a form accepted. i should say here that the form is also submitting
info for the join table too.
So in my model I have:
class Type < ActiveRecord::Base
has_and_belongs_to_many :subtypes,
:class_name => ''Type'',
2006 Apr 05
25
How to avoid bunch of <% %> ??
Hello, I would like to know is there is a way to avoid poluting the
views with tons of <% %> ?
Like this
<%= start_form_tag() %>
<%= text_field_tag(''category[title]'', category.title, {:size => 20,
:maxlength => 128}) %>
<% if not category.parent_id.nil? %>
<%= select("category", "parent_id",
Category.find(:all,
2005 Aug 15
2
Newbie rendering problem
Hi
On every list request i render an item partial through a collection of
items. the item table has 3 columns namely name,anotherName and id. the
item partial looks like
<%@item=item%>
<%= error_messages_for(:item) %>
<tr id="<%=item.id%>">
<% for column in Item.content_columns %>
<td><%=h item.send(column.name) %></td>
<%
2006 Feb 15
6
error_messages_for trouble
I am trying so learn how to do custom validations.
The validation works as expected, but I can''t get "error_messages_for"
to display.
How is the name of the object supposed to be formated?
Where is this object created, the model or controller?
What am I doing wrong here?
#### Model ########################
class MyFolder < ActiveRecord::Base
def validate
# validation
2006 Mar 07
12
rjs and partials
I''m trying to update a list, and having a hard time applying visual effects
to the latest element created. Here is what I''m doing.
===========================================
1) Creating an "item" via an action, then rendering the RJS template
2) RJS template looks like this:
page.insert_html :top, ''items'', :partial =>
2006 Jul 14
3
Rails newbie: How does the submit_tag work?
I would appreciate any and all input. The Agile book is not useful in
this context. :o(
As near as I can tell, it doesn''t work at all.
I would expect that clicking on the [Next Question] button in the
browser would fire the next_question method in the current controller.
Instead, it (apparently) does nothing.
The tag in question
<%= submit_tag ''Next
2007 Sep 23
9
Code reviews: my dumb use of acts_as_commentable (newbie)
With the help of several heroes here yesterday I beat my way into a
working solution to adding comments to one or more models in my
application using acts_as_comentable. Great plugin, but my
implementation is lame. I need enlightenment.
I have users who log in. For several views I want to let them add
comments. Enter act_as_commentable which does just this -- it''s
polymorphic, so you
2006 Mar 17
1
How to update values in database in this form?
Hi,
This is my rHtml page & Corresponding actions & model pages:-
===listform.rHtml=================
<h1>Products List</h1>
<%= start_form_tag(:action => "add_to_cart")%>
<table>
<tr>
<%
i=0
%>
<th>
Product No.
</th>
<th>
Unit Price
</th>
<th>
Available Qty.
</th>
<th>
Demand Qty.
</th>
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
2008 Aug 27
5
VALIDATION QUESTION
I''m trying to validate a record before save. I''m using one controller
in this case furnii where I have all my calls. The problem is that, the
form containing the field I''m trying to validate resides in the furnii
views. I tried to add validates_presence_of :content (the field name) in
both the furnii model and the ratecomment model but it does not work. I
know there
2006 Feb 27
2
submit_tag
How can i use the submit_tag method (from: actionView::FormTagHelper)
to create various submit buttons and chose the right action in accord to
the button that i pushed?
--
Posted via http://www.ruby-forum.com/.
2010 Jan 20
5
disable submit_tag after click
This code disables the ''Save'' button once clicked, but doesn''t seem to
send the form data.
<%= submit_tag ''Save'', :class => ''submit'', :onclick =>
"document.getElementById(''save_button'').disabled=true;", :id =>
"save_button" %>
This code sends the form data and a record is created,
2007 Jun 26
3
what is the :or parameter in a submit_tag ?
I read the following tag in teh Beast example
<%= submit_tag''Login'', :or => link_to_function(''forgotten password'',
"$(''reset-password'').toggle();") %>
I understand the link_to_function, but what is this :or parameter used
for ?
the link doesn''t appear, so it cannot be used...
thanks for your lights
kad
--
2009 Oct 19
1
submit_tag or f.submit
Hello all,
I am pretty much new here, trying to move to RoR from .net world.
I will appreciate if anyone clarifies this for me.
Most of books use "submit_tag" in new or edit views, but I see Rails API
web documents use "f.submit" instead. I also see Agile Web Development
using RoR 3rd Edition use the same "f.submit" instead of "submit_tag."
Which way is
2009 May 24
1
is f.submit in a form_for newer than submit_tag?
some books or even the rails api uses
form_for ...
...
submit_tag ...
end
and i found that the Rails 2.3.2 Scaffold uses
f.submit "Go"
instead... and this is not in the rails api doc. Is this a new
addition and is it suppose to replace submit_tag?
--
Posted via http://www.ruby-forum.com/.
2006 Apr 05
2
RJS and remote forms
I''ve run into what I think is a browser bug related to using
remote_forms pushed in an RJS update.
In my controller, I have an action that creates a new model and returns
a form for one of its children:
def create_party
party = Party.create
render :update do |page|
page.insert_html :top, ''party-list'', :partial => ''party_header'',