Re: [Rails-core] Why is ActiveResource::Base.site a class variable?

2009-12-14 Thread Michael Koziarski
How about this approach (suggested by Adam Milligan): class ActiveResource::Base  def self.connect(current_site)    old_site = site    begin      self.site = current_site      connection(:refresh)      yield    ensure      self.site = old_site    end  end end This would also need

[Rails-core] re: to_yaml fails for DateTime objects

2009-12-14 Thread Serguei Filimonov
I found this bug on Lighthouse with no patch and wrote a fix with necessary tests. The patch is available on the ticket page ( https://rails.lighthouseapp.com/projects/8994-ruby-on-rails/tickets/3511-to_yaml-fails-for-datetime-objects ) This patch applies to 2-3-stable branch. I'll soon upload a

[Rails-core] Ruby Debug (ruby-debug)

2009-12-14 Thread RubyNewbie
Question: I was wondering if there was a way to instruct the ruby debug framework to stop/break/freeze on any error so I can investigate the call stack to diagnose the problem? Background: I am using 'ruby-debug' and know that I can insert breakpoints with the debugger() method call in my code.

[Rails-core] ActiveSupport for Rails 3

2009-12-14 Thread botanicus
Hey guys, I'm wondering about future of AS and Extlib. I heard that these two should be merged (so extlib will actually die), which makes sense since these two are sort of similar so we can have just one main library with Ruby stdlib extensions. However would this library be suitable for smaller

[Rails-core] Touching nested attributes

2009-12-14 Thread Ivan Ukhov
Hi, I'd like to suggest a patch for rails, but dont know what should I do to be able to create tickets in lighthouse. So the patch is about nested attributes. When we assign them, it would be nice to `touch' the record itself. For example, it is useful when you cache fragments with the cache key

[Rails-core] default_url_options documentation

2009-12-14 Thread Jeffrey
The embedded documentation for ActionController#default_url_options() is incomplete, inaccurate or at least misleading. Applying it as shown to an application will cause the automated tests to fail on argument count mismatches. And other tests that check host in URLs may start failing if :host

[Rails-core] Simplest Nested form and ActiveRecord::AssociationTypeMismatch

2009-12-14 Thread clodeindustrie
Hi, I'm struggling with the simplest nested form and I can't really find any information about my problem after an hour of googling. Here is the thing: I have a contract model that belongs_to a kid model, I'm trying to create a form for contract and create at the same time with nested form, the

[Rails-core] Re: Attribute option on Errors#full_messages

2009-12-14 Thread glenn
I've implemented the same thing again on 2-3-stable and attached another patch. Thanks, Glenn https://rails.lighthouseapp.com/projects/8994-ruby-on-rails/tickets/3505-attribute-option-on-errorsfull_messages#ticket-3505-2 On Mon, Nov 23, 2009 at 2:01 PM, Glenn gle...@gmail.com wrote: I want

[Rails-core] AssociationCollection#include? ignoring build associated objects

2009-12-14 Thread marklazz
Hey people, I've created a patch for this issue: https://rails.lighthouseapp.com/projects/8994/tickets/3472-associationcollectioninclude-ignoring-build-associated-objects, and I had some positive reviews about it. I'm not sure about how to proceed with the process of 'verification' of the patch,

[Rails-core] Validating uniqueness of field with utf8 chars fails with mysql

2009-12-14 Thread mhennemeyer
Hi! While trying to get the (edge) rails test suite to pass on my system i encounter two failures that are showing up in the native mysql suite and are passing with postgresql and sqlite. Both are taking place when validating the uniqueness of string fields that contain utf8 chars. 1.

[Rails-core] Apologies for the moderation delay

2009-12-14 Thread Michael Koziarski
Hey guys, Sorry for the delay in moderating the core list, a tonne of spam crept in and was masking the legit messages waiting in the queue. -- 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

Re: [Rails-core] Ruby Debug (ruby-debug)

2009-12-14 Thread Chad Woolley
This list is for discussion of Rails internal development, not general ruby questions. Having said that, check out the 'cat' (catchpoint) functionality in ruby-debug... On Wed, Dec 2, 2009 at 10:44 AM, RubyNewbie calvinanhngu...@gmail.com wrote: Question: I was wondering if there was a way to

Re: [Rails-core] Touching nested attributes

2009-12-14 Thread Michael Breen
Hi Ivan, The Contributing to Rails guide[1] is a good place to start. Good luck. Mike [1] http://guides.rails.info/contributing_to_rails.html On Dec 9, 2009, at 5:30 AM, Ivan Ukhov wrote: Hi, I'd like to suggest a patch for rails, but dont know what should I do to be able to create

Re: [Rails-core] Simplest Nested form and ActiveRecord::AssociationTypeMismatch

2009-12-14 Thread Michael Koziarski
Any clue anyone ? I would like to try to do the things right and as simple as possible without particular trick. This list is for questions about the development of ruby on rails, not it's use. Please use the rubyonrails-talk list for questions like this. Having said that, looks like you've

Re: [Rails-core] Validating uniqueness of field with utf8 chars fails with mysql

2009-12-14 Thread Michael Koziarski
Could you run these tests and verify (or not) them so i can be sure that they are not somehow related to my environment? You need to make sure that you have your encoding and collation set to a unicode-friendly value rather than the default of latin1. I have it set to utf8_unicode_ci and it

Re: [Rails-core] default_url_options documentation

2009-12-14 Thread Xavier Noria
Please do not hesitate to join docrails for doc patches, it is much more agile and we put one ticket less in LH. Sent from my iPhone El 30/11/2009, a las 16:44, Jeffrey r...@abluz.dyndns.org escribió: The embedded documentation for ActionController#default_url_options() is incomplete,

[Rails-core] Re: to_yaml fails for DateTime objects

2009-12-14 Thread Serguei Filimonov
In the same ticket, I also attached a patch file for the master branch. On Dec 11, 1:28 pm, Serguei Filimonov serguei.filimo...@gmail.com wrote: I found this bug on Lighthouse with no patch and wrote a fix with necessary tests. The patch is available on the ticket page

Re: [Rails-core] ActiveSupport for Rails 3

2009-12-14 Thread Yehuda Katz
Heya, We spent a bunch of time making ActiveSupport more cherry-pickable. If there are still clumps that aren't fine-grained enough for your needs (I did some work to make the inflector a bit more fine-grained), please let me know (I'd consider it a bug). Are you otherwise concerned about the

Re: [Rails-core] ActiveSupport for Rails 3

2009-12-14 Thread Jeremy Kemper
On Sun, Dec 13, 2009 at 8:26 AM, botanicus stas...@101ideas.cz wrote: Hey guys, I'm wondering about future of AS and Extlib. I heard that these two should be merged (so extlib will actually die), which makes sense since these two are sort of similar so we can have just one main library with