[Rails-core] Re: bug with mem_cache and marshaling

2009-01-25 Thread Flinn Mueller
cache_fu has a method for handling this type of issue which has been adapted for Rails.cache here: http://github.com/actsasflinn/snippy/blob/77bdc5760180a5b5a8652af6dc6b1e3ecebbd99f/vendor/plugins/cache_contrib/lib/active_support/cache/patches/auto_load_missing_constants.rb It's not really a b

[Rails-core] Re: MySQL auto-reconnect revisited

2009-01-25 Thread Chad Woolley
On Sun, Jan 25, 2009 at 8:36 PM, Michael Koziarski wrote: > Send us a patch with test for this one, nice find! Yeah, great catch. This totally bit me on some daemons in the past when the mysql connection died after several days... -- Chad --~--~-~--~~~---~--~~

[Rails-core] Re: acts_as_list patch

2009-01-25 Thread Michael Koziarski
> bit outta the loop on patching these days, but this makes the tests > run again and supports multiple (array of names) based scoping for > acts_as_list Do you have this in a git repository somewhere? Looks good to me but a git repostiory or git-format-patch file would make it way easier to app

[Rails-core] Re: Question about _pick_template and template_file_extension

2009-01-25 Thread Joshua Peek
Ah, so its not picking up templates w/o an extension. Seems like a legit bug. Could you please wrap this up in a patch and create a LH ticket. I think files w/o an extension (in a view path) should be renderable without a template handler. I don't think they should be erb processed. On Jan 25,

[Rails-core] Re: MySQL auto-reconnect revisited

2009-01-25 Thread Michael Koziarski
> 1. It doesn't stick. A look at the sources of the mysql gem tells that > the > real_connect method sets reconnect to 0 (false). Since real_connect > is called > after the line given about, it'll reset the value of reconnect to > 0. A simple > test for that will be: > >def test_connecti

[Rails-core] Re: Is there an "before_commit" hook somewhere in Rails? after_save does not help (example code attached)

2009-01-25 Thread Matt Jones
In your previous examples, the validation was getting called twice because you *defined* it twice; once in Allocation and once in Book. The preferred idiom in Rails is to define it once, and be careful how you use the objects. Since your rule won't allow Allocations or Books to be updated in

[Rails-core] Question about _pick_template and template_file_extension

2009-01-25 Thread Daniel Guettler
Hi, quick question about _pick_template and template_file_extension. The template_file_extension is extracted in the method but not used later to find a template. This leads to the case were a template isn't found and Template.new(template_path, view_paths) is called which triggers a performance

[Rails-core] Re: Make rake gems:build respect Rails.env

2009-01-25 Thread Chad Woolley
On Sun, Jan 25, 2009 at 9:08 AM, Josh Susser wrote: > > This is a good improvement, but I dislike that building gems loads the > environment at all. If something in your environment file uses a > class defined in a gem, you get a circular dependency where you need > the gem you're trying to buil

[Rails-core] Re: Is there an "before_commit" hook somewhere in Rails? after_save does not help (example code attached)

2009-01-25 Thread Greg Hauptmann
BTW - I've had an indication after posting on a mysql forum site that MySql does not provide a "deferred constraints" feature, whilst apparently Oracle and Postgres do. From what I gather this would have been useful as I could have put the business logic check in the database I think, to be only

[Rails-core] Re: Is there an "before_commit" hook somewhere in Rails? after_save does not help (example code attached)

2009-01-25 Thread Greg Hauptmann
thanks stephen - I think (haven't tested it) the problem here would still be called a line 1 (see below) of my use case. So whilst it would trigger validation for chapter in a non-looping sense, the problem is that until Chapter & the Allocation are saved to DB the validation will fail. Make sens

[Rails-core] Re: Is there an "before_commit" hook somewhere in Rails? after_save does not help (example code attached)

2009-01-25 Thread stephen paul suarez
hmmm, i have an idea for you but i think it's a bit hacky.. i've put the check on validation since i think it mostly relates to validating your models..# --- Allocation --- class Allocation < ActiveRecord::Base belongs_to :book belongs_to :chapter validate :check d

[Rails-core] Re: bug with mem_cache and marshaling

2009-01-25 Thread Michael Koziarski
> this fix, which is a uber hack, shows quite clearly the bug - i'm > *really* curious if anyone else has seen this behaviour This has been reported a few times before, but given that it only happens during the initial requests, it's less likely to be noticed. > in case it isn't obvious this simp

[Rails-core] bug with mem_cache and marshaling

2009-01-25 Thread ara.t.howard
i'm seeing issues with how caching interacts with auto const loading in production. it's find if the objects cached are top-level themselves, but an object graph (model + associations) is cached i'll get errors when a production process first comes up (no models loaded) and hits the cach

[Rails-core] Re: Make rake gems:build respect Rails.env

2009-01-25 Thread Ken Collins
I recently encountered this circular dependency but I'm not a fan of by passing the environment and more importantly the preinitializer which my app makes heavy use of. The only problem I ran into was the Rails::Initializer#prepare_dispatcher method that caused my ApplicationController an

[Rails-core] Re: Make rake gems:build respect Rails.env

2009-01-25 Thread Josh Susser
This is a good improvement, but I dislike that building gems loads the environment at all. If something in your environment file uses a class defined in a gem, you get a circular dependency where you need the gem you're trying to build in order to build gems at all. Seems like the only w

[Rails-core] Re: I would like to contribute to the development of rails.

2009-01-25 Thread Frederick Cheung
On 25 Jan 2009, at 11:20, pankaj wrote: > > thanks Manfred, > > By prerequisites i meant, technical knowledge required. > Although I know ruby and rails, I have not looked much inside the > rails framework( the code). > What do you suggest should be the path to start contributing. > I am reading

[Rails-core] Re: I would like to contribute to the development of rails.

2009-01-25 Thread pankaj
thanks Manfred, By prerequisites i meant, technical knowledge required. Although I know ruby and rails, I have not looked much inside the rails framework( the code). What do you suggest should be the path to start contributing. I am reading Design Patterns in Ruby by Russ Olsen. Have also gone th

[Rails-core] Re: I would like to contribute to the development of rails.

2009-01-25 Thread Manfred Stienstra
On Jan 25, 2009, at 9:35 AM, pankaj wrote: > I would like to contribute to the development of rails. > What are the prerequisites for it. Please guide. > Regards, > Pankaj Hi Pankaj, There are no prerequisites to contribute code. If you have something you would like to fix or add, follow the

[Rails-core] I would like to contribute to the development of rails.

2009-01-25 Thread pankaj
I would like to contribute to the development of rails. What are the prerequisites for it. Please guide. Regards, Pankaj --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to this gro