#rubyonrails - Sat 31 Mar 2007 between 08:27 and 08:32

NY Lost Funds



ben_hwell the semantic meaning isn't really useful when you're writing ruby
Ashims*blink* uhm... I'm going to... forget it... I agree... ruby changes things.
ReinHYou've already acknowledges that Foo.new instantiates a Foo object. Therefore Class.new instantiates a Class object. and since class Foo and Foo = Class.new are equivalent, classes are therefor objects. Woot.
*acknowledged
damn keyboard
and *therefore
actionReinH gives up
ReinHgives up
Ashimsin that case class is the name of an object.
ReinHAshims: Constants are also objects.
Well, not exactly true
Constants "hold* objects
So class isn't the name of the object, the constant is the name of the object
And the object that it "holds" is... a class.
ben_hAshims: yes, Class is the name of an object
ReinHor, rather, a Class.new, which is the same thing
ben_hoh i see. yeah that
PalishOkay, I've lost my rails reference book, if someone could answer this simple one, that'd be awesome. If I have a model which belongs_to :classroom, how do I get at that classroom object?
ReinHPalish: model.classroom
Palishin the console it's saying that's nil
ReinHwhere model is an instance of that model
Palishhm..
ben_hPalish: that's good
AshimsI'm talking about the abstract concept of the term class which is the groundwork that becomes an object... if the class itself was an object then the object would have nothing to define it
ReinHPalish: what is model.classroom_id ?
AshimsTHE OBJECT WOULDN"T HAVE A MEANING IN LIFE
and it would commit suicide
ReinHAshims: Not true...
ben_hPalish: that means the association is there, but classroom_id isn't set for that row
zoidyDoes ActiveRecord have anything to deal with dates so I don't have to write SQL?
ben_hPalish: if the association was broken you'd get 'undefined method classroom()'
Palishit is broken.
ReinHAshims: a class is an object. a class instantiates objects.
Palishokay, just a DB problem. Thanks though
ReinHzoidy: absolutely
AnakinKainhmmm is there an easy way to scroll images on mouse over with javascript?
zoidyReinH: can you point me to the docs of that?
AnakinKainand rails?
ben_hzoidy: it can be tricky when you want to do arithmetic with them. but yeah, it wraps it up pretty well
ReinHzoidy: hmmm... basically Rails uses the Date and Time classes
zoidyis it compatible with mysql's datetime()?

Page: 5 12 19 26 33 40 47 54 61 68 75 82 

IrcArchive

NY Lost Funds