[Rails-core] Another take on ActiveModel

2008-09-09 Thread August Lilleaas
Greetings, At RailsConf Europe 2008, I spent some time playing with my own implementation of ActiveModel. Most of the validations stuff has been implemented now, so I think it's ready to be shared with the community. http://github.com/leethal/activemodel/tree/master I have not yet tried to inte

[Rails-core] Re: [Patch] 1.5.days.ago != 36.hours.ago - Looking for feedback

2008-09-09 Thread Geoff B
On Sep 9, 3:17 pm, "Michael Koziarski" <[EMAIL PROTECTED]> wrote: > Much as it pains me to say it, the best option seems to be removing / > deprecating the use of fractional years and months. There's just not > a nice solution in either case. If the issue is not being able to exactly specify wh

[Rails-core] Re: acts_as_tree

2008-09-09 Thread Trevor Turk
On Sep 8, 11:04 pm, "Carlos Henrique Palhares" <[EMAIL PROTECTED]> wrote: > where I can add a patch to acts_as_tree plugin? I'm not positive, but I think you'd fork the repo here: http://github.com/rails/acts_as_tree/tree/master ...make a patch according to the basic idea behind these guideline

[Rails-core] Re: [Patch] 1.5.days.ago != 36.hours.ago - Looking for feedback

2008-09-09 Thread Tom Lea
Agreed. I'll get a working day/week with nuked year/month patch knocked up in the next few days. Any better ideas welcome in the meantime. - tom On 9 Sep 2008, at 21:17, "Michael Koziarski" <[EMAIL PROTECTED]> wrote: > >> We could also consider 52 weeks in a year as an option? But this >

[Rails-core] Re: [Patch] 1.5.days.ago != 36.hours.ago - Looking for feedback

2008-09-09 Thread Michael Koziarski
> We could also consider 52 weeks in a year as an option? But this still > skips out months... Plus it's wrong during leap years... > > The last option, is removing support for fractional months (and > years?) by making Numeric#months a method on Integer instead of > Numeric? We could even put a

[Rails-core] Re: AR Result Set plugin

2008-09-09 Thread Frederick Cheung
Just to follow up on this (not that I've had time to touch this since last week), what do people think we could do with this that would be useful ? Fred --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Ruby on

[Rails-core] Re: [Patch] 1.5.days.ago != 36.hours.ago - Looking for feedback

2008-09-09 Thread Tom Lea
On 9 Sep 2008, at 02:54, Geoff B wrote: > > On Sep 8, 2:26 pm, Tom Lea <[EMAIL PROTECTED]> wrote: >> Do you have a test case that fails? > > Actually, you're right -- it doesn't fail with Time.local instances. > But it does fail with TimeWithZone instances, as of of this commit: > http://github.

[Rails-core] Re: Mysql and non null text columns

2008-09-09 Thread Frederick Cheung
On 9 Sep 2008, at 17:58, Jeremy Kemper wrote: >> >> >> Does this sound reasonable? Have others run into this ? > > Yes, sounds good. We do our best to 'just work' with MySQL and this > quirk shouldn't be an exception. > Cool. I'll patchify it when I'm satisfied that this fix doesn't screw anyt

[Rails-core] Re: Mysql and non null text columns

2008-09-09 Thread Jeremy Kemper
On Tue, Sep 9, 2008 at 9:47 AM, Frederick Cheung <[EMAIL PROTECTED]> wrote: > We've been having some problems with mysql 5 and not null text columns > (versions 5.0.67, 5.0.51a and 5.0.51b) > > Mysql reports the columns as having a default of null (the column is > actually a not null) which causes

[Rails-core] Mysql and non null text columns

2008-09-09 Thread Frederick Cheung
Hi, We've been having some problems with mysql 5 and not null text columns (versions 5.0.67, 5.0.51a and 5.0.51b) Mysql reports the columns as having a default of null (the column is actually a not null) which causes activerecord to try and insert nulls where it can't which makes things im

[Rails-core] Re: a generic solution to defaults in AR model initialization

2008-09-09 Thread tron
Jonathan, cool, it does exactly what I need and more, but once we are at it let me raise some issues. The way you define defaults, symbol values are called on the instance This intends to capture the situation when an attribute is by default assumes the value of another attribute (e.g., default

[Rails-core] Re: Loading the schema for Active Record tests

2008-09-09 Thread Michael Koziarski
Jon Leighton wrote: > On Sep 7, 10:53 pm, Josh Susser <[EMAIL PROTECTED]> wrote: >> On Sep 7, 2008, at 5:58 AM, Jon Leighton wrote: >> If you run the whole test suite via rake test_mysql, it happens >> automatically using a dirty trick. If you want to do it manually, you >> need to run the fi