Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

Activity (RSS)

Monday, September 10 2007
108 not expected query in paginate association was updated
  • Chris Wanstrath
    • State changed from new to open
    by Chris Wanstrath at 11:40 AM

    Alright, I'll check this out later today.

  • RainChen
    RainChen created the ticket at 12:08 AM

    some thing like:

    @project = Project.find(:first)

    @project.tasks.paginate :page =>2, :per_page=>2

    will bring 3 sqls as:

    1. this is not expected

    SELECT * FRO...

109 repeat conditions in paginate association was updated
  • Chris Wanstrath
    • Assigned user changed from Chris Wanstrath to Mislav
    • State changed from new to open
    by Chris Wanstrath at 11:40 AM
  • RainChen
    RainChen created the ticket at 12:11 AM

    I install Exported revision 365, it seems repeat the same conditions:

    paginate_options = { :page => params[:page], :per_page => 30, :order => ‘ID DESC’ } @pro...

cache_fu: setup FragmentCacheCache fo... was committed by Chris Wanstrath at 11:39 AM
Saturday, September 08 2007
body_matcher: @response.body support ... was committed by Chris Wanstrath at 6:14 PM
Friday, September 07 2007
107 Option to Omit Page Numbers was updated
  • awt
    awt created the ticket at 11:07 PM

    It would be nice not to have to perform the counts required provide numbered page links.

Thursday, September 06 2007
106 extend Ambition to ActiveRecord associations was updated
  • Grant Rodgers
    Grant Rodgers created the ticket at 5:07 PM

    Seems like a natural addition: add all the goodness from ActiveRecord classes to associations!

    We have this kind of stuff all over our app:

    current_user.answ...

105 add scoped finders was updated
Wednesday, September 05 2007
will_paginate: prevent double loading... was committed by Chris Wanstrath at 4:23 PM
Tuesday, September 04 2007
103 svn checkout fails was updated
  • Chris Wanstrath
    Chris Wanstrath commented at 12:49 AM

    Moved to git!

    $ git clone git://errtheblog.com/git/ambition

Monday, September 03 2007
103 svn checkout fails was updated
  • Chris Wanstrath
    • State changed from new to resolved
    by Chris Wanstrath at 11:18 PM

    You need to delete your local copy and re-'svn co' ambition. Sorry, this was my fault.

  • Matthew King
    Matthew King commented at 8:57 AM

    Also:

    svn: Failed to add directory 'fixtures/.svn': object of the same name already exists

    I delved into the test dirs and did a bunch of "svn up -N"s to get...

  • Matthew King
    Matthew King created the ticket at 8:41 AM

    svn: Failed to add directory 'ambition/test/databases/lib/.svn': object of the same name already exists

104 Super-abstraction feature request was updated
  • Matthew King
    Matthew King commented at 10:28 AM

    email and AIM: automatthew@gmail.com

  • Matthew King
    Matthew King commented at 10:03 AM

    FYI, I'm attending Lone Star Ruby Conf, if you have any interest in chatting about this.

  • Matthew King
    Matthew King created the ticket at 9:59 AM

    This feature request/offer-to-help may go in a direction you don't wish to take Ambition. No worries, if so.

    I want to use the ruby interface offered by Ambi...

Sunday, September 02 2007
102 RuntimeError When Invoking #to_sql or #to_hash was updated
  • Chris Wanstrath
    • State changed from hold to resolved
    by Chris Wanstrath at 2:37 PM

    Sweet!

  • John Topley
    John Topley commented at 2:00 PM

    Hi Chris,

    I just ran this through the console again and would you believe that it's now working fine! :-) I've no idea what the problem was before but a reboo...

  • Chris Wanstrath
    • State changed from open to hold
    by Chris Wanstrath at 12:40 PM
98 Regexp expressions ignored was updated
96 ambition: hard-coded MySQL syntax in WhereProcessor methods was updated
100 LIMIT clauses accumulate, anger PostgreSQL was updated
Saturday, September 01 2007
96 ambition: hard-coded MySQL syntax in WhereProcessor methods was updated
  • Matthew King
    Matthew King commented at 5:12 PM

    I usually don't do the chatty things, but I can on weekdays. On weekends, my real boss requests that I keep computer work to a minimum.

  • Chris Wanstrath
    Chris Wanstrath commented at 3:17 PM

    Do you have AIM or hang out on IRC? I'm doing some refactoring today and want to talk to you about this patch / concept.

94 ambition should use 'is' for NULL instead of == was updated
101 arrays don't work for SQL IN() statement was updated
100 LIMIT clauses accumulate, anger PostgreSQL was updated
  • Chris Wanstrath
    • State changed from new to open
    by Chris Wanstrath at 3:21 PM

    Looking at this now, just wanted to say that it's a bug that #first(3) is a kicker. Definitely should not be. So this patch is built upon my bug, but I'll me...

102 RuntimeError When Invoking #to_sql or #to_hash was updated
  • Chris Wanstrath
    • State changed from new to open
    by Chris Wanstrath at 2:20 PM

    Hey John,

    Can you please post the code you typed into IRB? This error means you are doing in Ruby which Ambition does not recognize (aka I need to add code f...

  • John Topley
    John Topley created the ticket at 12:00 PM

    Hi,

    I get a RuntimeError when invoking the #to_sql or #to_hash methods on a Query object in an irb session:

    RuntimeError: Missing process method for sexp: [:...
Friday, August 31 2007
101 arrays don't work for SQL IN() statement was updated
  • Loïc
    Loïc created the ticket at 1:50 PM

    I think I found a little bug :

    In your example you show that User.select { |m| [1, 2, 3, 4].include? m.id } is translated to "SELECT * FROM users WHERE users....

94 ambition should use 'is' for NULL instead of == was updated
  • Chris Wanstrath
    • State changed from resolved to open
    by Chris Wanstrath at 12:41 PM

    Hey, thanks for the patch.

    I'm reopening this bug as a 'note to self' because I need to add IS NOT NULL.

  • David Chelimsky
    David Chelimsky commented at 7:49 AM

    You're welcome. Just happens that the first thing I tried it on needed that :)

    This is a really great idea Chris. In addition to making finders feel more like...

96 ambition: hard-coded MySQL syntax in WhereProcessor methods was updated
  • Matthew King
    Matthew King commented at 10:06 AM

    I'm uploading a meaty patch (with tests!) that implements the idea in my last comment. I.e., it monkeypatches the Abstract, MySQL, and PostgreSQL adapters wit...

98 Regexp expressions ignored was updated
  • Matthew King
    Matthew King commented at 7:45 AM

    postgres has different regexp operators for case sensitive and case insensitive. Perhaps the flags could be tracked for use in adapter-specific regexes.

    http...

Thursday, August 30 2007
96 ambition: hard-coded MySQL syntax in WhereProcessor methods was updated
  • Matthew King
    Matthew King commented at 6:59 PM

    Re: database-specific translators for regexp

    How bad of an idea is this?

    Monkeypatch each ActiveRecord adapter with regexp-producing methods, then call them ...

  • Chris Wanstrath
    Chris Wanstrath commented at 12:29 PM

    I think having database-specific translators maybe the only way. Since that requires some architecture re-thinking, I may take that on later tonight sometime....

  • Matthew King
    Matthew King commented at 11:27 AM

    Regarding REGEXP and SQL standards, I dunno. I haven't been using postgres long, and I have to look everything up anyway. Speaking of which, the PostgreSQL m...

100 LIMIT clauses accumulate, anger PostgreSQL was updated
  • Matthew King
    • Title changed from LIMIT clauses accumulate, anger PostgreSQL unbearably to LIMIT clauses accumulate, anger PostgreSQL
    by Matthew King at 6:38 PM
  • Matthew King
    Matthew King commented at 6:35 PM

    Here is a patch (with tests!) that substantially changes the way Ambition::Limit works.

    It solves the PostgreSQL problem by breaking out limit and offset into...

  • Matthew King
    Matthew King commented at 6:30 PM

    Attached is a patch with a test that demonstrates the accumulation problem. Easy to reproduce: just run Query#first with an argument more than once on the sa...

  • Matthew King
    Matthew King created the ticket at 6:26 PM

    Each time you kick a first or [] off of a query using a limit or offset, it accumulates a LimitProcessor in keyed_clauses[:limit].

    Additionally, PostgreSQL do...

99 ambition: Less than and greater than cause stack trace was updated
  • Chris Wanstrath
    • State changed from new to resolved
    by Chris Wanstrath at 1:59 PM

    Crap!

    Fixed in http://projects.require.errthebl...

    Just pushed out the 0.1.5 gem, expect it soon. Thanks!

  • Louis Rose
    Louis Rose created the ticket at 1:54 PM

    When constructing a query using something like the following, I receive a stack trace, after calling to_sql or to_hash on the query object:

    Property.select { ...
94 ambition should use 'is' for NULL instead of == was updated
97 #downcase maps previous call to a relationship was updated
98 Regexp expressions ignored was updated
95 can't run tests for ambition was updated