Displaying 20 results from an estimated 2000 matches similar to: "collection_select"
2006 Jul 12
2
YART (Yet Another Rails Talk)
This morning I gave a talk on Rails to the NYC CTO Club. The slides
for are online at
http://www.io.com/~jimm/writing/rails_ctoclub/s5/index.html. Hover
over the bottom right corner of the window to see the navigation
controls, including the one that brings up the notes. Printing the
slides works really well; the presentation includes CSS that formats
the whole thing for print output.
The main
2006 Feb 23
1
PostgreSQL CASCADE not copied to test db
When the unit test harness creates a test database from the
development database, the ON DELETE CASCADE constraints I have on my
foreign keys are not copied into the test database. (I can tell by
looking at db/development_structure.sql.)
That means the fixtures can''t load/unload from the test database
properly. In other words, all my tests fail with the same error
message:
2006 Aug 10
1
Web service SOAP URLs started failing with 1.1.4 or using 1.1.2 security patch
Railers,
I''m trying to figure out why invocations to my Web service URLs work
with Rails 1.1.2 but fail both with Rails 1.1.4 (and 1.1.5) and when I
apply the new 1.1.2 security patch to Rails 1.1.2.
It looks like they are failing with SOAP clients but succeeding with
XML-RPC clients.
The URL that used to work is of the form
http://localhost:3000/my_controller/ServiceName/api. When I
2011 Aug 11
17
f.collection_select: what are the parameters?
The rails docs are so horrible on the collection_select method. They
need to show a *complete* form, and show two examples: one that calls
f.collection_select(), and another that calls collection_select(), and
explain the differences.
Given this line:
f.collection_select :topic, Topic.all, :id, :category
What the !@#$!@#$ is :topic?
--
Posted via http://www.ruby-forum.com/.
--
You received
2005 Jan 07
3
ruby on cygwin and mysql - problem connecting to db
Hi,
I''m trying my hand at rails by working through the tutorial. I''m stuck
on getting the rails app, running on webrick, to talk to mysql. I''m
getting the "No such file or directory - /tmp/mysql.sock" message that
I''ve seen that others sometimes encounter.
Here''s my environment:
Win2k w/ cygwin installed at c:\cygwin
ruby installed via
2006 Aug 10
4
1.1.5 Upgrade and config.load_path not working
Hey,
I am trying to upgrade to 1.1.5 and rails no longer finds my controllers the
live outside app/controllers. I was on 1.1.2 previously and here is my
setup
In environment.rb
config.load_paths += [File.join(File.expand_path(RAILS_ROOT),
"rails_shared/controllers") ]
config.load_paths += [File.join(File.expand_path(RAILS_ROOT),
"rails_shared/helpers") ]
2006 May 28
3
Working with topics and categories
Hello guys,
I''m a newbie in RoR and I have a problem. My DB structure is
======================================
topics table : id(int,11)
name(varchar,255)
categories : id (int,11)
topic_id(varchar,255)
name(varchar,255)
======================================
--Models:--
class Topic < ActiveRecord::Base
has_many :categories
end
class
2006 Feb 26
0
rdoc-mode for emacs
I''ve whipped together this Emacs mode for editing rdoc files. It''s
based off of generic-mode. I''ve set it to be active when you open
README_FOR_APP or any .rdoc file.
Share and enjoy.
Jim
--
Jim Menard, jim@io.com, jim.menard@gmail.com
http://www.io.com/~jimm
-------------- next part --------------
A non-text attachment was scrubbed...
Name: rdoc-mode.el
Type:
2006 Feb 26
0
Rdoc mode for Emacs
I''ve whipped together this Emacs mode for editing rdoc files. It''s
based off of generic-mode. I''ve set it to be active when you open
README_FOR_APP or any .rdoc file.
Share and enjoy.
Jim
--
Jim Menard, jim@io.com, jim.menard@gmail.com
http://www.io.com/~jimm
-------------- next part --------------
A non-text attachment was scrubbed...
Name: rdoc-mode.el
Type:
2006 Apr 27
3
collection_select to display 2 fields
I''m trying to get a collection_select generated Drop-down box to display
two fields from a table (first name & last name); however, I am having
trouble concatenating the symbols. It appears as though any code I put
in the 5th argument for collection_select is processed prior to
executing the collection_select method. The code executes successfully
with 1 symbol in the 5th
2005 Jan 25
4
Collection_select with multiple options
Hi,
I have built a select field that allows multiple options selected with
collection_select and "multiple"=>"multiple". How do I go about
receiving the values? If I use a variable name like collection[], it
complains that I can''t use @collection[] as the instance variable.
TIA
victor
2006 Jun 22
2
Setting an index on a collection_select
I am creating a data entry form that allows a user to fill in multiple rows
and save them all at once. In my controller, I create an array of "person"
objects and pass it to the page. On the page, I have a text field like so:
<%= text_field "person", "name", "index" => 1 %>
Note the "index" attribute, which sets the name and id
2006 Jul 16
6
using collection_select
hello,
supposing i have a User class that contains a Wibble
class User < ActiveRecord::Base
has_one :wibble
end
in my view i have
<%= collection_select :user, :wibble, Wibble.find(:all), :id, :name %>
when i post, i get an error like
"Wibble expected, got String"
how/where am I supposed to convert this posted wibble_id into a
Wibble, or am I using collection_select
2007 Aug 03
2
Does collection_select work in list.rhtml?
Hi,
I have 2 models:
Model 1: er, Columns: <er_id, er_name>
Model 2: er_process, Columns: <er_id, er_process_name>
er_id is a foreign key for Model 2.
When I am creating a new er_process or editing an existing one, I have
been successful to use collection_select to show the available er''s so
that the user can select a particular er by its name (to populate the
er_id
2012 Sep 13
3
Creating a link_to from a collection_select
I want to be able to change one attribute of a link_to to be what is the
current selection of the collection_select. And needless to say I can''t
quite figure it out.
app/views/tasks/show.html.erb
Who would you like to assign this task to?<br />
<%= link_to ''Myself'', :controller => ''task_queues'', :task_id => @task.id,
:action =>
2006 Nov 29
5
Collection_select with two columns and a prompt
Hello,
I am quite a newbie to RoR, I hope you maybe able to help.
I have a collection_select in a _form.rhtml:
"collection_select(:assets, :model_id, @models, :id,
:model_ref,options={:prompt => ''- Select a model -''})"
As you see my drop down menu will show the model_ref column.
1) Is it possible to have more than one column. For example I would
like to
2006 Aug 17
3
Use collection_select
I use the following code in my view:
<%= collection_select(''datedata'', ''date'', @allDate, :id, :date) %>
It''s show me the date of all entries in the database (Dropdown menu).
Additional, I wrote a helper method "showDate" in the
application_helper.rb! How can I use this method in the
collection_select for every date entry?
thanks
2006 Nov 28
2
collection_select and selected_value
Hi,
I am using collection_select to build a drop down list. I would like
to have the current value selected. How can I do that?
My current code is straight from the example in Pragmatic Programmers
book [2nd ed, p480] copying here for reference.
<%=
@users = User.find(:all, :order => "name" )
form.collection_select(:name, @users, :id, :name)
%>
I went through the api docs
2006 Aug 16
1
how to update a collection_select from another
I have two collection_select in my list.rhtml:
<%= collection_select (:region, :id, @regionall, :id,
:title,html_options={:onChange => "new
Ajax.Updater(''related_provinces'',''/categories/related_provinces/" +
"?id=''+this[this.selectedIndex].value,
{asynchronous:true, evalScripts:true});"}) %><br>
<%= render :partial =>
2010 Aug 30
1
update form text_field on collection_select selection
I have form and a collection_select control. I would like to update
form fields (text box) when I select an item from the collection_select
box.
It''s like selecting template from the collection_select and the template
automatically loads to text boxes.
Any help?
--
Posted via http://www.ruby-forum.com/.
--
You received this message because you are subscribed to the Google Groups