[Rails-core] Re: Refactoring AR::Base.find

2007-08-22 Thread zdennis
One important feature of an ActiveRecord find refactoring should be the ability to extend functionality without having to modify a core class, although this perhaps does not come first. After releasing ActiveRecord::Extensions 0.5.0 I started refactoring AR and found a lot of nastiness. I like th

[Rails-core] AR Associations: Don't clobber :extend options with a block

2007-08-22 Thread Josh Peek
Right now, blocks passed to an association macro clobber the :extend options. This patch merges the :extend options and block instead. has_many :projects, :extend => SomeAssociationExtension do def find_least_recent find(:first, :order => "id ASC") end end http://dev.rubyonrails.org/tick

[Rails-core] Ruby opportunity in Chicago (Franklin Park)

2007-08-22 Thread TEKjobs
I have an exciting opportunity with a leading multi-media company in Franklin Park just outside of Chicago. They've been around for over fourty years and have always been an industry leader in cutting edge technologies. The ideal addition to the team would have some background with PHP development

[Rails-core] Re: Hash for order key in ActiveRecord::find

2007-08-22 Thread Pratik
ActiveSupport::OrderedHash won't work here. On 8/22/07, Jatinder Singh <[EMAIL PROTECTED]> wrote: > Oh yes, ordering is a problem with this approach. String works well > unless we want to have ordered hash here. > > > > -Jatinder > > On 8/22/07, Mislav Marohnić <[EMAIL PROTECTED]> wrote: > > On 8/

[Rails-core] Re: Hash for order key in ActiveRecord::find

2007-08-22 Thread Jatinder Singh
Oh yes, ordering is a problem with this approach. String works well unless we want to have ordered hash here. -Jatinder On 8/22/07, Mislav Marohnić <[EMAIL PROTECTED]> wrote: > On 8/22/07, James Adam <[EMAIL PROTECTED]> wrote: > > > > On 8/22/07, Jatinder Singh <[EMAIL PROTECTED]> wrote: > > >

[Rails-core] Re: Hash for order key in ActiveRecord::find

2007-08-22 Thread Mislav Marohnić
On 8/22/07, James Adam <[EMAIL PROTECTED]> wrote: > > > On 8/22/07, Jatinder Singh <[EMAIL PROTECTED]> wrote: > > Wouldn't It more be more inuitive to say something like > > :order => { :name => :asc, :created_at => :desc} > > Intuitively this is a nice idea, but it will cause problems because > th

[Rails-core] Re: Hash for order key in ActiveRecord::find

2007-08-22 Thread James Adam
On 8/22/07, Jatinder Singh <[EMAIL PROTECTED]> wrote: > Wouldn't It more be more inuitive to say something like > :order => { :name => :asc, :created_at => :desc} Intuitively this is a nice idea, but it will cause problems because the order of columns in an ORDER BY clause is significant, and yet

[Rails-core] Hash for order key in ActiveRecord::find

2007-08-22 Thread Jatinder Singh
Hey, Currently the value of :order key in find method of ActiveRecord has to be a string, :order => ' name asc, created_at desc ' Wouldn't It more be more inuitive to say something like :order => { :name => :asc, :created_at => :desc} Similar to :conditions, which has got Hash support recently.

[Rails-core] Re: HOWTO generate rails skeleton

2007-08-22 Thread Mislav Marohnić
On 8/22/07, hhifnawi <[EMAIL PROTECTED]> wrote: > > > 1- oh sorry I thought I'd ask here as people here are the closest to > the Rails implementation. You might want to check the source for the console script that generates a skeleton: http://dev.rubyonrails.org/browser/tags/rel_1-2-3/railties/bi

[Rails-core] Re: HOWTO generate rails skeleton

2007-08-22 Thread hhifnawi
1- oh sorry I thought I'd ask here as people here are the closest to the Rails implementation. 2- umm why is it "bafflingly" hilarious that we're creating a rails IDE? 3- can you elaborate on this? On Aug 22, 9:14 am, "Gabe da Silveira" <[EMAIL PROTECTED]> wrote: > 1. This list is for core implem