> Certainly all you're saving is around ten keystrokes, but there's a > clarity benefit, and doesn't require any significant effort to > understand.
It does, however, add a whole other method to our supported api. Every feature we add has to be supported in future releases. Saving 10 keystrokes isn't quite enough to get over that hump. There are some unanswered questions though: * How would it work with options like :order, :include * Does it return :first or :all? the name implies :first but your proposed implementation is :all. > The optimisations Ben's patch provides are certainly great from a > performance point of view, but I think that Court3nay's argument still > stand; the one thing that springs to mind when I think about > dynamically-generated methods in Rails is the nightmare of debugging > routes issues - surely we should be trying to remove as much magic as > possible that isn't necessary? I hardly think that Site.find_by_domain(request.host) is anywhere near as magic as some of the edge cases in routes. I think it's pretty neat, on the other hand: User.find_all_by_email_and_subscription_status_and_locked(email, 'premium', false) Is something of an abomination... -- Cheers Koz --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en -~----------~----~----~----~------~----~------~--~---
