#rubyonrails - Wed 18 Apr 2007 between 12:42 and 12:56



JasonKingt432: yes, of course. Things like this are quite common: collection_select :parent, :child_id, Child.find(:all), :id, :name
t432: although I'd assign Child.find(:all) (or Klass.find(:all) in your case) to @children in the controller and use that in the view.
t432do I place it in the form input or the controller?
JasonKingt432: collection_select is a form helper.
t432ok thx
JasonKingt432: so that'd be in (typically) a <%= collection_select.... %>
ElMatadorhow do i observe (as in e.g. observe_field) a collection_select? i use it to build a dropdown and i'd like to get the value as soon as something is selected.
JasonKingElMatador: take a look at observe_field in the API (http://api.rubyonrails.org/
actionJasonKing just noticed that you included that in your question
JasonKingjust noticed that you included that in your question
ElMatador: where's the confusion?
ElMatadorJasonKing: well, my question would be if i can observe a collection_select as i would observe a text_field
JasonKing: or even shorter: is a collection_select a field? :)
JasonKingElMatador: hmm, smells like you haven't actually tried this. I'll leave you to stumble over how easy this is yourself.
ElMatadorJasonKing: hehe...well, then i'll go for a coffee first ;-)
JasonKingElMatador: really, take a guess at how it would work and you'll almost certainly be right.
ElMatador: the hardest part is remembering to include the prototype JS library.
ElMatadorJasonKing: the only thing i'm not sure about is the field-id observe_field needs
JasonKingElMatador: that's what "View Source" was made for.
ElMatadormy collection-select has no id...but i hope i can add an id by using it's html-options?
by id i mean "DOM ID"
myobiei am trying to convert a pdf to a jpg with rmagick, but my fonts are coming out aliased...is there something i can do?
JasonKingElMatador: are you sure?
t432Jason, getting a nil object on 6 http://pastie.caboo.se/54654 .. can you help me out here
is this even correct
JasonKingt432: umm, you *are* setting @klass in your controller right?
t432I am trying to list all the courses (column1) from the model klass
ahh no
do I need a new method for that?
JasonKingt432: before you go, that's not what you're asking that helper to do.
RubyPanthert432: http://poignantguide.net/ruby
Woutranyone familiar with this kind of error: http://pastie.caboo.se/54659.txt?key=dxskjjyz36nwlskyhc
it only happens in production mode, development mode works fine
joabI've been following the guide at hivelogic for installing ruby etc from source. When I run ./script/server the page comes up as expected but when I press the "About your application's environment" the server dies and shows me an error: "dyld: Symbol not found: _rl_filename_completion_function". I have installed my own readline so it should be ok. So what is this?
chell!pastie
Woutreverything is in place as it should be, gems are the same
JasonKingt432: it will produce a list of options like this: <option value="<%= @klass.id -%>"><%= @klass.name -%></option>
chellpastie: hi!
pastiehttp://pastie.caboo.se/54661 by chell.
chelljust a test...
twistshowanyone here ever style a select_year helper??

Page: 4 11 18 25 32 39 46 53 60 67 74 81 88 95 102 109 116 

IrcArchive