#rubyonrails - Sat 31 Mar 2007 between 07:00 and 07:07

NY Lost Funds



ReinHIt's now a facet as well... but facets suck
psticknezachinglis, but if you use a block it will create a closure
Palishaha..that makes more sense
psticknezachinglis, _BUT_ the closure will be for the same binding
zachinglispstickne: how would you do it?
Palishdoes .blank? work on an array?
AnakinKainthanks for helping out though.
zachinglisI want to have Preference.site_name etc
Palishguess not.
ReinHPalish: [].blank? #=> true
Palishwhat about nil.blank?
ReinHPalish: console
or ri blank?
Palishoh
zachinglisand i'll make the methods that need to be created
ReinHor /api
er
Check the rails API! http://labs.parkerfox.co.uk/ruby.search
psticknezachinglis, http://pastie.caboo.se/50767
ReinHnil, "", [], {}, and false are blank iirc
zachinglispstickne: Is this how you would do it?
psticknezachinglis, I don't exactly know what you're doing :)
ReinHpstickne: damm you and your trailing whitespace
psticknetrailing w/s? :(
ReinHpstickne: indeed
zachinglispstickne: I want to assign all the functions that aren't already assigned, from the database table Preference.
ReinHpstickne: for .. in ... ?? you bad boy
psticknezachinglis, I would likely make assign_variables() => each { assign_variable() }
zachinglisPreference.site_name etc
ReinHzachinglis: s/function/method
psticknezachinglis, and let the assign_variable method create it's own closures, the lambda was just to--hopefully--show what the problem is
zachinglisbut if Preference.site_url is defined, then it won't be created. as site_url may have something of its own
ReinHzachinglis: and what are these functions?
zachinglisFor A) Easy access. B) lets say i have site_url, i'll add a trailing slash if there is none (in example). or something more complex
If you really think it's the wrong approach, i will divert. As I want best coding practices as this will eventually be OpenSource
ReinHzachinglis: I don't know what the functions *do* yet
I mean methods
zachinglisOk
ReinHstop confusing me
lol

Page: 4 11 18 25 32 39 46 53 60 67 74 81 

IrcArchive

NY Lost Funds