[Rails-core] Re: Hatred towards Nested Polymorphic Paths

2007-07-06 Thread Daniel N
On 7/7/07, Evan Weaver <[EMAIL PROTECTED]> wrote: > > > I tend to agree with this. I don't really understand the need to > "canonically" identify a resource based on its context. > > Other thoughts? > > Evan > > > > On 7/7/07, Josh Peek <[EMAIL PROTECTED]> wrote: > > > > > > I have a real grudge ag

[Rails-core] Re: Hatred towards Nested Polymorphic Paths

2007-07-06 Thread Evan Weaver
I tend to agree with this. I don't really understand the need to "canonically" identify a resource based on its context. Other thoughts? Evan > On 7/7/07, Josh Peek <[EMAIL PROTECTED]> wrote: > > > > I have a real grudge against the new nested polymorphic path magic > > stuff. I feel it encour

[Rails-core] Hatred towards Nested Polymorphic Paths

2007-07-06 Thread Josh Peek
I have a real grudge against the new nested polymorphic path magic stuff. I feel it encourages and gives people an excuse to write overly compelled routes. Resources should NOT be nested more than one level deep. "/companies/1/people/1" == BAD "/people/1" == GOOD I have no problem with nested co

[Rails-core] Re: Rails AR/Oracle Unit Test: [7167] failed (getting worse)

2007-07-06 Thread Michael A. Schoen
Gabe da Silveira wrote: > Ugg, this is from my patch. I know nothing about Oracle. Can someone > explain what the error means and why the query is in a subselect? Haven't had a chance to look at yet, but for pagination (ie., limit or offset) you need to use a subquery for Oracle. --~--~-

[Rails-core] Re: Rails AR/Oracle Unit Test: [7167] failed (getting worse)

2007-07-06 Thread Gabe da Silveira
Ugg, this is from my patch. I know nothing about Oracle. Can someone explain what the error means and why the query is in a subselect? On 7/6/07, Michael Schoen <[EMAIL PROTECTED]> wrote: > > "nzkoz" has kicked AR/Oracle while it was down... > > http://dev.rubyonrails.org/changeset/7167 > -

[Rails-core] Rails AR/Oracle Unit Test: [7167] failed (getting worse)

2007-07-06 Thread Michael Schoen
"nzkoz" has kicked AR/Oracle while it was down... http://dev.rubyonrails.org/changeset/7167 r7167 | nzkoz | 2007-07-06 19:42:42 -0700 (Fri, 06 Jul 2007) | 3 lines Move from select * to select tablename.* to avoid clobbering

[Rails-core] Re: JOINS clobbering ids or other fields.

2007-07-06 Thread Gabe da Silveira
Great, thanks. If anything goes wrong I'll definitely be around to add additional test cases and further tweaks if necessary. On 7/6/07, Michael Koziarski <[EMAIL PROTECTED]> wrote: > > > http://dev.rubyonrails.org/ticket/8889 > > > > The solution is 1.5 lines, and I have a test included. Teste

[Rails-core] Re: JOINS clobbering ids or other fields.

2007-07-06 Thread Michael Koziarski
> http://dev.rubyonrails.org/ticket/8889 > > The solution is 1.5 lines, and I have a test included. Tested under > mysql... not sure if the syntax can be assumed the way I did it for > all cases... > I've applied the fix because I've also been bitten by this. But we'll have to keep an eye out f

[Rails-core] Re: respond_to forces template format

2007-07-06 Thread Michael Koziarski
> I just don't think that the content type should mandate the template > format. It should prefer a specific format, but if that format > doesn't exist, I think it should use the Accepts header to determine > other template formats. There be dragons. The accepts header is a constant source of s

[Rails-core] Re: respond_to forces template format

2007-07-06 Thread Brandon Keepers
On Jul 7, 2007, at 5:04 AM, Josh Peek wrote: > Referring to brandon's example... (http://pastie.caboo.se/76204) > > It seems to me like it should act that way. If I wanted to change the > template format, I would do render :action => > "index.html.erb", :layout => false (Not tested, but I hope w

[Rails-core] Re: Receiving a request whose body ends will a null byte

2007-07-06 Thread Michael Koziarski
> I can't see any trace of it in edge either (or even a comment > explaining a similar fix). > A cursory inspection with tcpdump and a current version of Safari > suggests it is no longer a problem (According to the changelog the > original fix dates back to 2005) and so perhaps this was just remo

[Rails-core] Re: respond_to forces template format

2007-07-06 Thread Michael Koziarski
On 7/7/07, Josh Peek <[EMAIL PROTECTED]> wrote: > > Referring to brandon's example... (http://pastie.caboo.se/76204) > > It seems to me like it should act that way. If I wanted to change the > template format, I would do render :action => > "index.html.erb", :layout => false (Not tested, but I hop

[Rails-core] Re: respond_to forces template format

2007-07-06 Thread Josh Peek
Referring to brandon's example... (http://pastie.caboo.se/76204) It seems to me like it should act that way. If I wanted to change the template format, I would do render :action => "index.html.erb", :layout => false (Not tested, but I hope works) I just don't really see it as a bug, although, I'

[Rails-core] Re: respond_to forces template format

2007-07-06 Thread Rick Olson
On 7/6/07, Michael Koziarski <[EMAIL PROTECTED]> wrote: > > > It appears that #8174 on edge broke the ability to render HTML in the > > JS respond_to block for an ajax request. Line 131 of > > mime_responds.rb explicitly sets the template_format to that of the > > mime type. This forces action v

[Rails-core] Re: respond_to forces template format

2007-07-06 Thread Michael Koziarski
> It appears that #8174 on edge broke the ability to render HTML in the > JS respond_to block for an ajax request. Line 131 of > mime_responds.rb explicitly sets the template_format to that of the > mime type. This forces action view to only look for templates of > that format (including layouts

[Rails-core] [PATCH] Broken/Conflicting Tests in ActionPack

2007-07-06 Thread Matthew Palmer
I've just put a new and improved form of the patch we've been discussing on the list into http://dev.rubyonrails.org/ticket/8714. I'd appreciate it if someone in core could review and, if there aren't any problems with it, apply it. Thanks, - Matt --~--~-~--~~~---~--

[Rails-core] Re: Broken/Conflicting Tests in ActionPack

2007-07-06 Thread Matthew Palmer
On Fri, Jul 06, 2007 at 02:58:20PM -, mikong wrote: > > > The best I can find through a quick trawl is > > actionpack/test/controller/controller_fixtures/app/models > > How about creating a file in the same directory where render_test.rb > is located (i.e. actionpack/test/controller)? There'

[Rails-core] Re: Wrong interpretation of limit in both Mysql and PostgreSQL adapters

2007-07-06 Thread Michael Koziarski
> Well, I was asked to include #5484 into this ticket, so it is dealing > with distinct bugs at once. Sounds good. This patch breaks sqlite's tests, if you can merge those in, it seems good to apply. > To understand those bugs, let's begin with a single migration that > creates a table with

[Rails-core] Re: New filter implementation causing problems in production ?

2007-07-06 Thread Michael Koziarski
> The patch is here: http://dev.rubyonrails.org/ticket/8891 I've forgotten why the return false was required for around filters. Couldn't we do: yielded = false filter.call(self) do yielded = true # all remaining before and around filters will be run in this call index = call_filters(chain

[Rails-core] Test XML Documents Using assert_select

2007-07-06 Thread Gabe da Silveira
Have you ever wanted to test your API output without those pesky assert_select error messages? Well now you can! http://dev.rubyonrails.org/ticket/8173 The patch has been sitting there quietly with no comment for a couple months now. I think it should be pretty easy to apply. It won't affect

[Rails-core] Re: Query cache plugin for rails 1.2

2007-07-06 Thread Rick Olson
On 7/6/07, inkling <[EMAIL PROTECTED]> wrote: > > I love the query cache from rails edge, but I didn't want to put our > production app on edge just yet. (went down that route in the 1.1.x > days, and the edge cut me a few times). So I think I have it ported > into a plugin we can use on 1.2.x >

[Rails-core] Query cache plugin for rails 1.2

2007-07-06 Thread inkling
I love the query cache from rails edge, but I didn't want to put our production app on edge just yet. (went down that route in the 1.1.x days, and the edge cut me a few times). So I think I have it ported into a plugin we can use on 1.2.x http://query-cache.googlecode.com/svn/query_cache/ Basi

[Rails-core] The Truth About Creative Baby Shower Thank You Poems

2007-07-06 Thread Moona Naeem
The Truth About Creative Baby Shower Thank You Poems Where are the cutest baby shower thank you poems? Don't you know the best thank you poems lie somewhere deep in your imagination? http://2site.com/kzfcnq The secret of picking the right domain name This little article tells you how to pic

[Rails-core] Re: Render Partial Hash Collection: Bug-Tracker Insanity

2007-07-06 Thread Pratik
Here we go http://dev.rubyonrails.org/ticket/8900 Cheers, Pratik On Jul 5, 12:59 am, "Michael Koziarski" <[EMAIL PROTECTED]> wrote: > > Notice some of those tickets were closed a month ago? I don't think > > they want it to be fixed... But if you can do it, sure, I'll check > > out the fixes a

[Rails-core] Re: Make #underscore reversible

2007-07-06 Thread Gabe da Silveira
I ran into this same situation and just went with the Rails flow. Aesthetically the class name is not ideal, but the underscore crs_contact is certainly nicer than c_r_s_contact. Given that hundreds of apps probably rely on this behaviour it seems like a bad idea to change it. On 7/6/07, Rich C

[Rails-core] Re: Make #underscore reversible

2007-07-06 Thread Jamis Buck
The standard approach to acronyms in class names is to capitalize only the first letter, e.g., CrsContact. The underscore/camelize process is then perfectly reversible. - Jamis On 7/6/07, Rich C <[EMAIL PROTECTED]> wrote: > > Hello All, > I've submitted a patch (http://dev.rubyonrails.org/tick

[Rails-core] Make #underscore reversible

2007-07-06 Thread Rich C
Hello All, I've submitted a patch (http://dev.rubyonrails.org/ticket/8898) to enable #underscore to be reversible. I had trouble creating a class named "CRSContact", and it turns out that underscore and camelize are not reversible in cases where there are 3 or more capital letters. As there i

[Rails-core] Re: Setup method in tests

2007-07-06 Thread Rebecca Blyth
On Jul 3, 4:45 pm, "Jonathan Viney" <[EMAIL PROTECTED]> wrote: > I wrote a small plugin a while ago that alters how the setup and teardown > methods work. With minor changes it should let you do what you want. > > http://svn.viney.net.nz/things/rails/plugins/testcase_setup_and_teard... > > -Jona

[Rails-core] Re: Setup method in tests

2007-07-06 Thread Rebecca Blyth
> but I'm obviously misunderstanding what's going on in method_added, since > this method doesn't appear to be getting run. A bit of extra logging cleared this one up for me. Here is a bit of a hack to get this working: def self.method_added(method) case method.to_s when 's

[Rails-core] Re: Setup method in tests

2007-07-06 Thread Rebecca Blyth
> but I'm obviously misunderstanding what's going on in method_added, since > this method doesn't appear to be getting run. A bit of extra logging cleared this one up for me. Here is a bit of a hack to get this working: def self.method_added(method) case method.to_s when 's

[Rails-core] Re: Broken/Conflicting Tests in ActionPack

2007-07-06 Thread mikong
> The best I can find through a quick trawl is > actionpack/test/controller/controller_fixtures/app/models How about creating a file in the same directory where render_test.rb is located (i.e. actionpack/test/controller)? There's a file there fake_controllers.rb that's used by 4 test files: asser

[Rails-core] Re: Receiving a request whose body ends will a null byte

2007-07-06 Thread Frederick Cheung
On 6 Jul 2007, at 12:29, Matthew Palmer wrote: > > On Fri, Jul 06, 2007 at 11:29:40AM +0100, Frederick Cheung wrote: >> occasionally the last byte of the post body was going missing. I >> tracked it down to the following method in action_controller/cgi_ext/ >> raw_post_data_fix: >> >> def read_b

[Rails-core] Re: Filter Ordering in Edge Rails (Rev 7143)

2007-07-06 Thread Andrew Kuklewicz
if that doesn't fix your problem, I also found a different bug in the edge filter processing that occurs when one filter adds an additional filter while processing - a bug in update_filter_chain. http://dev.rubyonrails.org/ticket/8383 -Andrew On 7/6/07, Stefan Kaes <[EMAIL PROTECTED]> wrote: > >

[Rails-core] Re: Receiving a request whose body ends will a null byte

2007-07-06 Thread Matthew Palmer
On Fri, Jul 06, 2007 at 11:29:40AM +0100, Frederick Cheung wrote: > occasionally the last byte of the post body was going missing. I > tracked it down to the following method in action_controller/cgi_ext/ > raw_post_data_fix: > > def read_body(content_length) > stdinput.binmode if stdinput

[Rails-core] Receiving a request whose body ends will a null byte

2007-07-06 Thread Frederick Cheung
Hi, I've been working on a problem we've been having with our app. In essence we have a controller that receives a blob of binary data (as a raw post) and processes it (this data happens to be a marshaled ruby object but that's not relevant here). The problem was that occasionally the las

[Rails-core] Re: Filter Ordering in Edge Rails (Rev 7143)

2007-07-06 Thread Stefan Kaes
A patch is here: http://dev.rubyonrails.org/ticket/8891 On 6/27/07, Michael Koziarski <[EMAIL PROTECTED]> wrote: > > > > Filter chaining appears to behave in differently than Rails 1.2.x. It > > seems that I'm getting a lot of errors along the lines of: > > > > ActionController::ActionController

[Rails-core] Re: New filter implementation causing problems in production ?

2007-07-06 Thread skaes
The patch is here: http://dev.rubyonrails.org/ticket/8891 -- stefan On Jul 4, 4:25 am, "Michael Koziarski" <[EMAIL PROTECTED]> wrote: > Stefan has a patch for these problems and more. Hopefully it'll show > up on trac in the next few days. > > -- > Cheers > > Koz --~--~-~--~~-