Displaying 20 results from an estimated 700 matches similar to: "using collection_select"
2006 Apr 25
7
Rails producing the / page.
Hi all
Very simple question, im sure, but I cant find docs anywhere that tell
me how to do this.
What I want is for the index page of the server to be generated from
rails, is www.wibble.com/ will result in a page that has been processed
by rails, has the templates etc.
>From what I can see, the index page comes from public/index.html How do
I get this to be a rails page?
Thanks
Jonathan
2006 May 08
1
kevent error (1.0.b7) - Is this a FreeBSD-only problem?
Hello everyone,
The problem below has been reported, but I did not see any response!
<cut>
| | I'm also seeing this bug while testing the forthcoming 1.0.b7 FreeBSD
| | port under 6.1-PRERELEASE:
| |
| | Info: imap-login: Login: user=<wibble>, method=PLAIN, rip=10.0.0.2,
| | lip=10.0.0.2, TLS
| | dovecot: Error: IMAP(isometry): Unrecognized event: kevent {.ident =
| |
2006 Feb 15
2
extending rails via /lib - problems
I wanted to group some functions which I use in some models in one
place. Controllers have application.rb and views have helpers but I
couldn''t find anything about models. Using the /lib directory seemed to
be the only way.
Alright... so I have something like this:
/lib/code.rb
class ActiveRecord::Base
def method_a(n)
.......
end
def method_b(n)
........
end
end
2006 Apr 17
2
Understanding when flash gets reset (render vs. redirect_to)
All,
I have a controller action that will do a different "render (:action)"
call
depending on whether or not data is valid.
When the data is invalid - I set a flash element to hold a message.
However, when I post back to this controller action and have valid data,
I still have the flash element set, which I don''t want.
I believe this is because I did a render from the
2006 Feb 02
0
proposed bugfix/patch: ActiveRecord cross-module associations
Hi,
I''m still test driving the improved support for module namespaces in
rails and I''ve hit a problem with associations between AR classes in
modules and AR classes in the root namespace.
The long and short of it is I want to be able to say:
Foo::Bar.belongs_to :wibble, :class_name => "::Wibble"
If you don''t try to prefix ''Wibble''
2006 Apr 21
8
Stop Models auto loading
Is there a way to stop Rails automatically trying to load models?
Cheers,
Nicholas
2003 Sep 11
1
Setting up a local shared mailbox
One: I have never set up an IMAP server before, so I thought I would ask
first before blindly stumbling around. The problem I am want to solve is
this: my wife and I have a "joint" email account that we both want to access
(we also have our own personal accounts, but that's beside the point.) I
posed the question to my local LUG, and several suggested setting up a local
IMAP
2007 May 01
2
Problem validating boolean
Hi
I''ve got a problem validating a boolean and I can''t see what the
problem is. Here''s my model:
class FinanceAgreement < ActiveRecord::Base
belongs_to :asset
validates_presence_of :finance_company
validates_inclusion_of :balance, :in => 0.01..10_000_000
validates_inclusion_of :term, :in => 1..600
validates_numericality_of
2007 Jan 25
9
Constant directory checksum changes
notice: /subject.sol1.net/virtual_mail_server/File[/etc/postfix]/checksum:
checksum changed ''{time}Thu Jan 25 16:31:08 EST 2007'' to ''{time}Thu Jan 25
16:36:39 EST 2007''
I know there''s something weird in the directory modification detection that
causes the next run after things actually change to suffer from this
problem, but I''m getting it
2000 Mar 22
0
Not being digested, now . . . the question!
Folks,
Thanks to Ricardo Stella and "Chris" for quick assistance, I had sent about 15
help requests to listproc and given up, seeing no sign of a samba-digest list
which is what my majordomo training has taught me. What a strange default
setting . . .
So onto my question about Samba. I've installed the latest RPM from the samba
FTP site (samba-2.0.6-19991110) on a RedHat Linux
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
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 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 =>
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
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
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
2005 Jan 21
2
collection_select
I''m trying to use collection_select, but it''s not working as I expect. The
list populates correctly but the current value is not selected.
@question contains a topic (via topic_id), and @topics is the list of all
topics. Here''s my attempt to create a drop-down list of the topics.
form("question") do | form |
form << content_tag("b",
2006 Apr 25
1
simple collection_select problem.
Hi,
I can do this :
collection_select "state", :id, TrainingState.find_all,:id,:name
but not this :
collection_select "state[]", :id, TrainingState.find_all,:id,:name
Anyone any idea why? Is there something about collection_select that
does not allow collections?
Thanks
Chris
--
Posted via http://www.ruby-forum.com/.
2006 May 24
0
Problems validating form with collection_select
I have the following models:
class Comandancia < ActiveRecord::Base
has_many :elementos
end
class Elemento < ActiveRecord::Base
belongs_to :comandancia
validates_presence_of :nombre, :apellido_paterno, :apellido_materno,
:comandancia
end
In the view for New Elemento I''m using
<%= start_form_tag :action => ''create'' %>
<%= render :partial =>
2006 Apr 21
0
collection_select has_and_belongs_to_many update_attributes
I know there have been threads on this before but I was thinking
shouldn''t multiple collection_select automatically update habtm
relations when you update_attributes?
In order to get multiple collection_select to work I use:
collection_select(:user, :group_ids, Group.find(:all), :id,
:name,{},{:multiple=>'''',:name=>''group[id][]''})
In fact if I