| blarf | tpope: lemmie see if I can clarify |
| tpope | k |
| blarf | I've got a group of computers that I am responsible for so, I'm attempting to keep an organized list of what versions of what software, and other crap are associated with each computer they're all windows boxen, so I'm a bit... eh. |
| Goetmet | how do u use collection_ids? |
| blarf | so I've got a model that represents the computer and each computer has_many features |
| Goetmet | got it |
| blarf | but feature is say a specific piece of software (AutoCAD 2k, AutoCAD 2k7LT, Office 2k, Office2kSP3, etc, etc) the ever so brilliant idea I had was to use single table inheritence |
| nika | does find_all on an array returned from a has-many step on Enumerable's find_all? |
| beeew | hi , does find_all on an array returned from a has-many step on Enumerable's find_all? |
| blarf | but that doesn't scale well, nor does it leave me with an easy way to find the variety of software I'm tracking unless I make my own hardcoded list tpope: does that make some sort of sense? |
| beeew | holy shit, i just copy and pasted the wrong line..ha (sorry nika) |
| nika | foo.bars.find_all { |b| b.prop == 'foobar' } (did have me wondering) ;-) |
| beeew | ok here's my line: does anyone in here use radrails / aptana on osx? |
| nika | whereas foo.bars.select { ... } is correct |
| JasonKing | nika: no, the find_all attached to hm associations is the ActiveRecord::Base find(:all) |
| nika | find_all and select are aliases. |
| RyanTM | blarf: Are you saying it doesn't scale well because you have to make a new model for each piece of software? |
| nika | ouch, that's... unexpected |
| blarf | RyanTM: yes |
| nika | JasonKing: thanks |
| beeew | i'm just trying to do the shortcut to comment and uncomment code.. i can't find it anywhere : T |
| blarf | RyanTM: not just model, but also I've got to edit the various things that would enumerate the software a computer has |
| JasonKing | nika: and yes, it annoys more than a couple of people from time to time. |
| nika | add me to that list |
| JasonKing | nika: .to_a is your friend |
| blarf | thus the original thought was to see if there's an easy way to just determine what objects subclass the super model |
| miloops | anyone here staying at Holiday Inn for RailsConf? |
| nika | JasonKing: yeah, a friend you shouldn't need... |
| JasonKing | nika: agreed. |
| blarf | miloops: I'm sure there are many holiday inns especially when you consider that the portland metro area spans two states |