| JasonKing | t432: 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. |
| t432 | do I place it in the form input or the controller? |
| JasonKing | t432: collection_select is a form helper. |
| t432 | ok thx |
| JasonKing | t432: so that'd be in (typically) a <%= collection_select.... %> |
| ElMatador | how 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. |
| JasonKing | ElMatador: take a look at observe_field in the API (http://api.rubyonrails.org/ |
| action | JasonKing just noticed that you included that in your question |
| JasonKing | just noticed that you included that in your question ElMatador: where's the confusion? |
| ElMatador | JasonKing: 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? :) |
| JasonKing | ElMatador: hmm, smells like you haven't actually tried this. I'll leave you to stumble over how easy this is yourself. |
| ElMatador | JasonKing: hehe...well, then i'll go for a coffee first ;-) |
| JasonKing | ElMatador: 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. |
| ElMatador | JasonKing: the only thing i'm not sure about is the field-id observe_field needs |
| JasonKing | ElMatador: that's what "View Source" was made for. |
| ElMatador | my 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" |
| myobie | i am trying to convert a pdf to a jpg with rmagick, but my fonts are coming out aliased...is there something i can do? |
| JasonKing | ElMatador: are you sure? |
| t432 | Jason, getting a nil object on 6 http://pastie.caboo.se/54654 .. can you help me out here is this even correct |
| JasonKing | t432: umm, you *are* setting @klass in your controller right? |
| t432 | I am trying to list all the courses (column1) from the model klass ahh no do I need a new method for that? |
| JasonKing | t432: before you go, that's not what you're asking that helper to do. |
| RubyPanther | t432: http://poignantguide.net/ruby |
| Woutr | anyone familiar with this kind of error: http://pastie.caboo.se/54659.txt?key=dxskjjyz36nwlskyhc it only happens in production mode, development mode works fine |
| joab | I'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 |
| Woutr | everything is in place as it should be, gems are the same |
| JasonKing | t432: it will produce a list of options like this: <option value="<%= @klass.id -%>"><%= @klass.name -%></option> |
| chell | pastie: hi! |
| pastie | http://pastie.caboo.se/54661 by chell. |
| chell | just a test... |
| twistshow | anyone here ever style a select_year helper?? |