Displaying 20 results from an estimated 1000 matches similar to: "RE: Rails Digest, Vol 21, Issue 64"
2006 Jun 04
3
passing a value in a hidden field inside a form
should be trivial but I can''t figure this out from api
<%= hidden_field ''certifications'', ''personnel_id'', {value =
#{@personnel.id}} %>
I want to pass the value of ''id'' field in my form to the certifications
controller as personnel_id
Craig
2006 May 29
5
Find last
This seems rather ugly. I am thinking that this needs to be in the model
but I am looking to obtain the date for a tb test...
>> @tb = Innoculation.find(:all,
:conditions => ["personnel_id = 1 AND innoc_type = ''TB''"],
:order => ''innoc_date DESC'')
=> [#<Innoculation:0xb77ed234 @attributes={"id"=>"1",
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 May 23
3
Pagination problem
hi everybody,
i am new to rails..
plz clear my doubt...
this is my question
In my table(public_topics), i have 11 rows of data..
whenever i run the following view, it shows the entire rows in the
current page..
and i have set the '':per_page'' option to ''2''.so it must show two data
per page..but it shows all the rows in a single page..and this case
continue
2006 Jul 12
7
Failure in comparisons
I''m basically a Ruby noobie.
At the moment I''m having a fair bit of trouble trying to figure out
what''s going wrong here (partial template):
<%=
@project = Project.find(@the_id)
if current_user.userid == @project.client
hidden_field ''messages'', ''recipient'', ''value'' =>
@project.project_manager
2005 Feb 05
0
Tom Skeren has a misconfigured server
Tom sent me a private email.
I replied and got this back.
From:
Mail Administrator
<Postmaster@cox.net>
Reply-To:
Postmaster@cox.net
To:
craigwhite@azapple.com
Subject:
Mail System Error - Returned Mail
Date:
Sat, 5 Feb 2005 01:44:16 -0500
2006 Feb 09
1
About join domain in different subnet.
Hi all:
I have a question about join domain.
If my samba server and domain controller are in different subnet (such =
as 192.168.1.x and 192.168.2.x), two conditions happened:
ADS domain
1. if I use domain name, then join fail.
2. if I use IP address of domain controller, join success.
However, in both cases I can't retrieve domain users/groups.
Is it necessary for samba sever and domain
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 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>
2006 Jun 18
5
on change of drop down showing a new textfield
hi,
i have a situation where i have a list of options from which a user selects
his options if its not in the list he/she selects Others/Not Present and a
new textfield should pop up and the data entered there should be considered
instead of dropdown.
i have done this using javascript/dhtml but i was wondering how this can be
done using pure rails i.e using some of the RoR apis?.
i would
2006 Aug 07
2
related to forms
I''m trying to construct a form that would request a page using GET and
would like my variables to be simple like q,v, etc so that the URL it
calls is something like: /controller/action?q=80&v=100
However, I''m having trouble using the basic form helpers (probably doing
something wrong) cos expressions such as:
<%= hidden_field "q", "v", {:value
2006 Feb 07
3
Creating a new object with a passed in parent?
I have a simple object, Article, which has_one :parent of the same time.
On my Show page for a given article there will be a "new child" button
which will pass the current :id (or the current Article itself) to the
new form. What is the proper way to hide a reference to this parent in
the form so that when it is submitted back, the create method knows what
to do with it?
2006 May 23
0
RJS replace adding multiple inputs
Hi,
I have a classic problem. I want to replace a hidden field inside a
form with a hidden field with some value when a link_to_remote is
pressed. In the link''s action rjs, I''m doing the following:
Assume my form has the following field already
<%= hidden_field(''client'', ''company_id'') $>
So I have a bunch of companies in a list with
2012 Oct 06
0
rails 3.2 question/answer with a through table
I have a person has many questions through person_questions. I have an
extra column in the join table for the answer. The section below works for
a new submit but when I edit I get 3 each with the first 2 of each selected
tand the third not so I get 6 check boxes some selected some not. Is there
a way to get this to work properly os just the questions in the db show up
once each with the
2007 Dec 16
0
pass the model type to the action via a hidden field?
I have a question about the acts_as_commentable plugin. In the
instructions it says to use hidden fields to pass the model type and
model id. This is somewhat confusing me. I am trying to add comments
to a user object and am not sure how to specify the model type. This
is the link that I am using to get the comment view where one will
enter his/her comments:
<%= link_to "add a
2010 Dec 22
1
nested attributes form
Hello!
I have a simple form with a nested attribute (has_one association). Is
works has expected on the new and create actions, the nested attribute
is correctly added in the database.
But when I am on the edit action the nested attributes fields are
empty...
and I am using the same partial for the form.
Am I missing something? Why I don''t get the nested fields displayed?
<%
2008 Mar 28
0
select in a loop
Hi
My view code is
<% for hardware_ci in @hardware_cis %>
<td> <%= select( "sd_ci", "service_desk_ci_association_type_id",
ServiceDeskCiAssociationType.find(:all).collect {|p| [ p.description,
p.id ] }) %></td>
<%= hidden_field "sd_ci", "id", "value" => hardware_ci.ci.id %>
<% end %>
<% for
2006 Jan 19
0
file_column error: tmp file created but not actual
Hi
When I submit the form with field_column, the actual
image is not
uploaded, only temp files are crreated and I dont see
actual file created and the image file name is not in
the database and get "fieldWithErrors". Then if
submit again, the actual file in created and an
database record is generated.
Here is the log file. I print @params and @wallpaper.
I find the following:
1st
2010 Nov 09
3
help getting started with javascript generated forms
How does one generate a form within a view using javascript?
Specifically, assume views/premise/new.html.erb looks like this:
<%= form_for(Premise.new) do |f| %>
<%= f.hidden_field :full_address, :value => $FULL_ADDRESS %>
<%= f.hidden_field :geocoding, :value => $GEOCODING %>
<%= f.submit :value => "use this address" %>
<%= f.label
2006 Jul 02
6
remote form w/ evalScripts:true
Hello. I want to select an item from a select list and have that
result in an ajax call that updates two sections on the page. Here is
the code in the controller
def create
...
render :update do |page|
page.replace_html ''list_items'', :partial => ''lists/list_items''
page.replace_html ''add_item'', :partial =>