[Rails-core] Patch for serious nil response bug when Action caching responses that are not cacheable

2011-02-27 Thread chuyeow
Hi guys, I've fixed a pretty annoying bug in Action caching that is detailed here: https://rails.lighthouseapp.com/projects/8994/tickets/6480-action-cache-filter-code-incorrectly-renders-nil-response-body-if-response-is-non-cacheable Would appreciate testers or a direct commit if it checks out :)

[Rails-core] Simple bugfix for default_url_options being ignored for named routes

2008-04-30 Thread chuyeow
Hi guys, Just wanted to try my luck to see if anyone is willing to review or commit a simple patch for default_url_options being ignored for named routes due to the named routes optimization before it gets too stale: Details + patch at: http://rails.lighthouseapp.com/projects/8994/tickets/22 Ch

[Rails-core] ARes can has timeout (patch reviews requested)

2008-04-21 Thread chuyeow
I've been using a lot of APIs in my Ruby (usually Rails) applications and I've learnt my lesson regarding socket timeouts. Basically, no response (from an API) is better than a slow response. In the cases of slow responses, it's better to time out so your ActiveResource clients can end execution f

[Rails-core] Some tiny patches for review

2008-02-14 Thread chuyeow
Just going through some of my old patches and hoping to get them reviewed/committed - all tiny house-keeping patches. Anyway, here goes: http://dev.rubyonrails.org/ticket/10895 - Add missing tests for AR::B#to_json for more than 1 :include. I had someone ask me about how to :include a 2nd associa

[Rails-core] Re: Bunch of patches for review (asset_host proc enhancement, faster symbolize_keys!, render :text => false bugfix and Hash.from_xml refactoring)

2008-01-06 Thread chuyeow
t;Jeremy Kemper" <[EMAIL PROTECTED]> wrote: > On 1/6/08, chuyeow <[EMAIL PROTECTED]> wrote: > > > I'm looking for people with time on their hands to help verify a > > couple of patches. Without further ado: > > >http://dev.rubyonrails.org/ticket/10

[Rails-core] Bunch of patches for review (asset_host proc enhancement, faster symbolize_keys!, render :text => false bugfix and Hash.from_xml refactoring)

2008-01-06 Thread chuyeow
Hi again everyone, I'm looking for people with time on their hands to help verify a couple of patches. Without further ado: http://dev.rubyonrails.org/ticket/10717 - Clean up Hash#stringify_keys and slight optimization to Hash#symbolize_keys! http://dev.rubyonrails.org/ticket/10549 - asset_host

[Rails-core] Fix render :text => false and render :text => nil

2008-01-02 Thread chuyeow
Obie Fernandez (http://www.jroller.com/obie/entry/render_text_gotcha) was asking in the #rails-contrib channel about getting this ticket (http://dev.rubyonrails.org/ticket/6684) fixed. If someone's free could you please review/verify it and appease the "ignored" ticket reporter ;)? Cheers, Chu Ye

[Rails-core] Re: RubyOnRails build 8525 failed

2008-01-02 Thread chuyeow
Fix for the bad (failing) test here: http://dev.rubyonrails.org/ticket/10664 On Jan 2, 5:33 pm, [EMAIL PROTECTED] wrote: > The build failed. > > CHANGES > --- > Revision 8522 committed by bitsweat on 2008-01-02 09:03:56 > db:sessions:clear task uses session_table_name method. Closes #10631 [C

[Rails-core] SQLite db:drop:all tiny fix + more teeny tinies

2007-12-30 Thread chuyeow
Hi all, Just some tiny fixes looking for reviews before the new year: http://dev.rubyonrails.org/ticket/10577 - this one is for the db:drop:all task, so that it doesn't silently ignore errors removing SQLite databases. http://dev.rubyonrails.org/ticket/10621 - docfix for incorrect example for as

[Rails-core] Mocha 0.5.6 breaks ActionController test

2007-12-28 Thread chuyeow
Hi guys, Could a core committer review and apply http://dev.rubyonrails.org/ticket/10602? This would get rid of a failing test with the latest version of mocha (0.5.6). Thanks much! Cheers, Chu Yeow --~--~-~--~~~---~--~~ You received this message because you are

[Rails-core] Specifying asset hosts via a proc (ActionController::Base.asset_host)

2007-12-16 Thread chuyeow
Hi all, I just submitted a patch that would allow you to pass a proc to ActionController::Base.asset_host rather than just using a %d wildcard (e.g. assets%d.example.com). Basically this frees you from the hard-coded assumption that you have 4 hosts numbered 0-3 and also allows you to do smarter

[Rails-core] Re: Refactoring ActionView Template Handlers

2007-12-09 Thread chuyeow
I know it's already been committed, but just wanted to say that that is awesome work Josh! On Dec 10, 5:46 am, "Jeremy Kemper" <[EMAIL PROTECTED]> wrote: > On 12/9/07, Josh Peek <[EMAIL PROTECTED]> wrote: > > > > > I've been doing some deep digging around ActionView lately, and > > thought I'd cl

[Rails-core] Re: fragment caching -- expiring entire folders

2007-12-09 Thread chuyeow
Thanks for patch, but would you mind submitting it to the Rails Trac? It'd probably get better visibility there as a patch. See http://dev.rubyonrails.org/wiki/ for more info. On Dec 9, 6:04 pm, fmardini <[EMAIL PROTECTED]> wrote: > Hi, > > I am using the file system store, and I need to expire

[Rails-core] Re: [ActiveSupport] Patches needing review: re-organization of #to_query methods, preservation of XML/JSON content-type

2007-12-09 Thread chuyeow
icket/10380 > The default double render error message still goes on about filters > needing to explicitly return false, which is no longer accurate > > On 7 Dec 2007, at 02:32, chuyeow wrote: > > > > > Just a quick pointer to some ActiveSupport patches hoping for reviews: >

[Rails-core] Re: Merb-style development exception pages for Mac OS X

2007-12-07 Thread chuyeow
ooks do matter on web pages). Cheers, Chu Yeow On Dec 8, 4:20 am, "Rob Sanheim" <[EMAIL PROTECTED]> wrote: > On Dec 6, 2007 9:01 PM, chuyeow <[EMAIL PROTECTED]> wrote: > > > > > > > I like the merb-style exception pages where there're links to open

[Rails-core] Re: Merb-style development exception pages for Mac OS X

2007-12-07 Thread chuyeow
Chu Yeow On Dec 7, 5:49 pm, Hongli Lai <[EMAIL PROTECTED]> wrote: > On Dec 7, 3:01 am, chuyeow <[EMAIL PROTECTED]> wrote: > > > I like the merb-style exception pages where there're links to open the > > files listed in the stack trace in TextMate and the source ar

[Rails-core] [ActiveSupport] Patches needing review: re-organization of #to_query methods, preservation of XML/JSON content-type

2007-12-06 Thread chuyeow
Just a quick pointer to some ActiveSupport patches hoping for reviews: Puts Array#to_query and Object#to_query in the right places in ActiveSupport - http://dev.rubyonrails.org/ticket/10395 Preserve user-specified content type for XML and JSON rendering (currently it's overridden and set to Mime

[Rails-core] Merb-style development exception pages for Mac OS X

2007-12-06 Thread chuyeow
I like the merb-style exception pages where there're links to open the files listed in the stack trace in TextMate and the source around each line a lot so I stole the idea (and the code!) and made a patch for Rails: http://dev.rubyonrails.org/ticket/10401 Here's how it looks like in Merb: http:

[Rails-core] Re: RubyOnRails build 8269 failed

2007-12-04 Thread chuyeow
Patch here: http://dev.rubyonrails.org/ticket/10364 Cheers, Chu Yeow On Dec 5, 4:20 am, [EMAIL PROTECTED] wrote: > The build failed. > > CHANGES > --- > Revision 8269 committed by david on 2007-12-04 20:04:48 > Removed some of the tags that does not make sense to allow per default in the >

[Rails-core] Re: Cannot load MySQL fixtures for ActiveRecord unit tests

2007-12-03 Thread chuyeow
host'; > > GRANT ALL PRIVILEGES ON activerecord_unittest2.* to > > 'rails'@'localhost'; > > > I run the test: > > raketest_mysql > > > And I get the exact same error. > > > On Dec 1, 10:30 pm, chuyeow <[EMAIL PROTECTED]

[Rails-core] Re: render_to_string in an after filter

2007-12-01 Thread chuyeow
This caught my attention (since I was having a play with merb's way of handling rendering) so I decided to see if I can replicate it with a test case. Mostly the reason why it's doing that, Shane, is because render_to_string doesn't work quite well if called _after_ the action has been rendered.

[Rails-core] Re: Cannot load MySQL fixtures for ActiveRecord unit tests

2007-12-01 Thread chuyeow
Hmm Frederick is right, that's all I've had to do. If you read the latest RUNNING_UNIT_TESTS (http://dev.rubyonrails.org/browser/trunk/ activerecord/RUNNING_UNIT_TESTS) and the connection settings for running tests on MySQL (http://dev.rubyonrails.org/browser/trunk/ activerecord/test/connections/n

[Rails-core] Some quick patches (of mine) I'd like to see before 2.0

2007-12-01 Thread chuyeow
Hi all, Just looking through a list of a few small patches I was involved in and hoping to garner some +1s before the big two-point-oh. Remove forward slash escaping from String#to_json (by Tim Pope, but I'd really like to see removal of unnecessary escaping where possible, and this is a small s

[Rails-core] Re: Anyone using to_xml and procs...

2007-11-21 Thread chuyeow
How about something like this instead (that still prevents the top- level :procs options from being passed on to associations)? posts_proc = Proc.new { |options| options[:builder].tag! ('copyright', 'DHH') } xml = authors(:david).to_xml( :indent => 2, :include => { :po

[Rails-core] Quick fix for obvious bug in plugin installer

2007-11-18 Thread chuyeow
The plugin installer is skipping files with filenames that start with 'http'. Please check out the comments in http://dev.rubyonrails.org/ticket/7887 for more details. Should be a quick fix that needs to go in before Rails 2.0 to prevent confusion when installing certain plugins imho. --~--~--

[Rails-core] Re: quick deprecation patch for Rails 2.0

2007-11-16 Thread chuyeow
> Can you explain what you mean by using :methods=>[:user_id]? Here's an example of: In your Photo class you can define a method 'user_id': class Photo def user_id user.id end end Then get to_xml to include it when serializing with a :methods => [:user_id] option. My opinion is that t

[Rails-core] 2 quick doc patches looking for +1s or commits

2007-11-05 Thread chuyeow
Hi again everyone, I've 2 tiny doc patches mostly involving grammar fixes (and errant whitespace elimination). My English is not perfect so any review would be very welcome. The patches: http://dev.rubyonrails.org/ticket/9819 http://dev.rubyonrails.org/ticket/10062 Thanks! Cheers, Chu Yeow

[Rails-core] JSON encoder shouldn't encode "<" and ">" as octals but as escaped unicode char

2007-10-27 Thread chuyeow
As far as I can tell the '<' and '>' characters don't actually need to be escaped to be valid JSON, but it's done anyway in Rails since PrototypeHelper and JavaScriptHelper depend on it, so I think we should leave it as it is until we decouple JSON encoding from the view helpers for generating inl

[Rails-core] 2 more quick JSON-related patches

2007-10-24 Thread chuyeow
Just some quick cleanup and documentation. Remove obsolete ActiveSupport::JSON::Variable - http://dev.rubyonrails.org/ticket/9969 Add documentation for Hash#to_json and Enumerable#to_json - http://dev.rubyonrails.org/ticket/9970 Please review :) Thanks! Cheers, Chu Yeow --~--~-~--~--

[Rails-core] Some JSON doc patches

2007-10-14 Thread chuyeow
In case Rails 2.0 gets released without these bits of documentation regarding the recent JSON changes, I'd like to highlight some docfixes: http://dev.rubyonrails.org/ticket/9833 and http://dev.rubyonrails.org/ticket/9814 Could a committer could take a quick look? Thanks! Cheers, Chu Yeow --~

[Rails-core] Re: 2 more JSON / XML feature parity patches before Rails 2.0

2007-10-04 Thread chuyeow
heers, Chu Yeow On Oct 4, 10:35 am, chuyeow <[EMAIL PROTECTED]> wrote: > I'd really like to see just 2 more functional changes to the JSON > serialization/encoding before we get to Rails 2.0. > > First, and I think this is really crucial because without it all the > efforts

[Rails-core] Re: 2 more JSON / XML feature parity patches before Rails 2.0

2007-10-03 Thread chuyeow
Thanks for checking in http://dev.rubyonrails.org/ticket/9751 (and improving a few things too), bitsweat! On Oct 4, 10:35 am, chuyeow <[EMAIL PROTECTED]> wrote: > I'd really like to see just 2 more functional changes to the JSON > serialization/encoding before we get to Rails 2.

[Rails-core] Re: Rails shouldn't output invalid JSON by default

2007-10-03 Thread chuyeow
Hey eggie, You'd be glad to know that this has been fixed! :) Edge Rails (and Rails 2.0) will emit valid JSON by default now. Cheers, Chu Yeow On Oct 4, 11:08 am, eggie5 <[EMAIL PROTECTED]> wrote: > I support this +1 > > On Sep 27, 7:51 pm, chuyeow <[EMAIL PROTECTED]>

[Rails-core] 2 more JSON / XML feature parity patches before Rails 2.0

2007-10-03 Thread chuyeow
I'd really like to see just 2 more functional changes to the JSON serialization/encoding before we get to Rails 2.0. First, and I think this is really crucial because without it all the efforts to output JSON from ActiveRecord objects would have been half in vain, is to allow us to do this in con

[Rails-core] More JSON and XML feature parity for AR and ActiveSupport (patch review)

2007-10-01 Thread chuyeow
I'm really glad the JSON changes got in, many thanks to all involved, committers and contributors alike :). But there's still one feature that's missing to achieve feature parity between the JSON and XML encoding/conversion. And that is the abililty to say in your controller: @authors = Author

[Rails-core] Rails shouldn't output invalid JSON by default

2007-09-27 Thread chuyeow
Please check out this ticket (which would explain almost everything): http://dev.rubyonrails.org/ticket/8762 So basically, Rails to_json methods produces invalid JSON out of the box as it doesn't quote all hash keys. This is valid JSON: { "id": 6589, "code": "SIN", "name": "Singapore" } T

[Rails-core] Re: Patch review requested for #9677: Add :include to ActiveRecord::Base#to_json

2007-09-25 Thread chuyeow
I've put up a new patch (see http://dev.rubyonrails.org/ticket/9677) on David's suggestion to move add_includes up into the Serializer superclass. Please help test. Thanks! Cheers, Chu Yeow On Sep 26, 12:27 am, chuyeow <[EMAIL PROTECTED]> wrote: > Simple patch really, that a

[Rails-core] Patch review requested for #9677: Add :include to ActiveRecord::Base#to_json

2007-09-25 Thread chuyeow
Simple patch really, that adds :include option to ActiveRecord::Base#to_json like for ActiveRecord::Base#to_xml: http://dev.rubyonrails.org/ticket/9677 Allows you to do: json = @david.to_json(:include => :posts) # or even... json = @david.to_json( :include => { :posts => { :include