Re: [Rails-core] Improving ActionController Filters

2006-07-02 Thread Ezra Zygmuntowicz
Martin- Take a look at this plugin that just came out. I think it does what you are looking for as far as wrapping actions and yielding to them. Even allows for a chain of such filters.http://roman2k.free.fr/rails/meantime_filter/0.1.0/rdoc/-EzraOn Jul 2, 2006, at 4:27 PM, Martin Emde wrote:Well, i

Re: [Rails-core] Improving ActionController Filters

2006-07-02 Thread Martin Emde
Well, if you use the new around filter that I'm proposing you won't have a "before action" and "after action" you'll just have one method that yields the perform_action for the controller. This way it's unavoidable (without an exception being raised) for the code not to be run. For example you wou

Re: [Rails-core] Improving ActionController Filters

2006-07-02 Thread Julian 'Julik' Tarkhanov
On 2-jul-2006, at 22:49, Andrew Kaspick wrote: I've definitely had a need for more improved around and after filters. If an action is cached, any after or around filters will not execute as processing is basically halted after the cached page is served. The problem here is that there is no as

Re: [Rails-core] Re: Patch for #3438: Eager loading doesn't respect :order of association

2006-07-02 Thread Coda Hale
On 7/2/06, Josh Susser <[EMAIL PROTECTED]> wrote: On Jul 2, 2006, at 10:24 AM, Coda Hale wrote: > This is not particularly friendly behavior, but the buck for this can > be passed on to the SQL standard: if you want an order, specify an > order. Otherwise, don't expect anything. > > Does this se

Re: [Rails-core] Improving ActionController Filters

2006-07-02 Thread Martin Emde
The way I want these filters to work is that every filter is a block that yields the next filter or action. That would mean that unless the action raises an exception, it should still go back thru all the filter methods after returning from each yield.. I'll try to make sure this is going to work,

[Rails-core] Rails Core Weekly June 19 - July 2 2006

2006-07-02 Thread Rodney Ramdas
This is another edition of Rails Core Weekly, affectionately known as RCW. A much nicer pre-web 3.0 version is available from the following url : http://www.pinupgeek.com/articles/category/rails-core-weekly-news We have an Atom/RSS feed available there as well. Rails Core Weekly summarizes the

Re: [Rails-core] Re: Patch for #3438: Eager loading doesn't respect :order of association

2006-07-02 Thread Josh Susser
On Jul 2, 2006, at 10:24 AM, Coda Hale wrote: This is not particularly friendly behavior, but the buck for this can be passed on to the SQL standard: if you want an order, specify an order. Otherwise, don't expect anything. Does this seem like a valid tradeoff to everyone? I think it's best t

Re: [Rails-core] Improving ActionController Filters

2006-07-02 Thread Andrew Kaspick
I've definitely had a need for more improved around and after filters. If an action is cached, any after or around filters will not execute as processing is basically halted after the cached page is served. It would be nice to have filters that are guaranteed to run regardless of whatever happens

Re: [Rails-core] Re: Patch for #3438: Eager loading doesn't respect :order of association

2006-07-02 Thread Mislav Marohnić
Not particularly friendly indeed, but you're right - if you want order, specify it. Like Ruby hashes, you never know what you're gonna get :)I don't know about Oracle, but in Postgres it's never smart to rely on 'default' ordering because when a complex query is altered or Postgres version chages,

[Rails-core] Improving ActionController Filters

2006-07-02 Thread Martin Emde
Hello all,I've been working with the action_controller filter code lately and I've noticed a lot of code repetition anda lot of room for improvement without breaking existing filter usage. I plan on submitting a patch that would clean this all up and add a few additional features. The main goal

Re: [Rails-core] Re: Patch for #3438: Eager loading doesn't respect :order of association

2006-07-02 Thread Coda Hale
On 7/2/06, Michael Glaesemann <[EMAIL PROTECTED]> wrote: On Jul 2, 2006, at 17:15 , Coda Hale wrote: > Well, I'm working with MySQL, which returns records by order of > primary key. (I think.) Does anyone know of any Rails-supported RDBMS > which doesn't do this? PostgreSQL follows the SQL-spe

Re: [Rails-core] Re: Patch for #3438: Eager loading doesn't respect :order of association

2006-07-02 Thread Michael A. Schoen
Coda Hale wrote: Well, I'm working with MySQL, which returns records by order of primary key. (I think.) Does anyone know of any Rails-supported RDBMS which doesn't do this? Oracle doesn't. ___ Rails-core mailing list Rails-core@lists.rubyonrails.org

Re: [Rails-core] Re: Patch for #3438: Eager loading doesn't respect :order of association

2006-07-02 Thread Michael Glaesemann
On Jul 2, 2006, at 17:15 , Coda Hale wrote: Well, I'm working with MySQL, which returns records by order of primary key. (I think.) Does anyone know of any Rails-supported RDBMS which doesn't do this? PostgreSQL follows the SQL-spec in this case. Michael Glaesemann grzm seespotcode net __

Re: [Rails-core] Re: Patch for #3438: Eager loading doesn't respect :order of association

2006-07-02 Thread Coda Hale
On 7/1/06, Michael Glaesemann <[EMAIL PROTECTED]> wrote: On Jul 2, 2006, at 8:21 , Coda Hale wrote: > If there is no > existing :order option in the find itself, the ORDER BY clause begins > with the primary key of the model being searched, which is the default > SQL order. I can't speak to the