[Rails-core] Re: [PATCH] validates_uniqueness_of does not quote scoped column names and then barfs

2010-06-19 Thread ara.t.howard
On Jun 19, 1:07 pm, Santiago Pastorino wrote: > Could you open an issue on LH and attach a patch following the guidelines? > So core team can make the patch yours. > Thank you ;). > https://rails.lighthouseapp.com/projects/8994-ruby-on-rails/tickets/4909-validates_uniqueness_of-does-not-quote-

[Rails-core] [PATCH] validates_uniqueness_of does not quote scoped column names and then barfs

2010-06-19 Thread ara.t.howard
this is a silly bug that breaks any code where the column name of a scope is a reserved word (like group): cfp:/opt/local/lib/ruby/gems/1.8/gems/activerecord-2.3.8 > diff -buB lib/active_record/validations.rb.org lib/active_record/validations.rb --- lib/active_record/validations.rb.org2

[Rails-core] Re: accepts_nested_attributes_for patch request

2009-04-07 Thread ara.t.howard
On Apr 5, 8:53 am, Eloy Duran wrote: > > Yep those were the reasons. It was removed especially because it was   > all highly theoretical. > > We could of course add an option to accepts_nested_attributes_for   > which enables this. > But I would suggest you'd first use your code as is for now

[Rails-core] Re: [PATCH] nested resource fields_for is fail for > one nested resource

2009-04-02 Thread ara.t.howard
> > On 2 apr 2009, at 21:51, ara.t.howard wrote: > > > > > SYNOPSIS > >  using fields_for with a nested attribute numbers the resource index > > incorrectly.  although this does not cause an exception it does make > > scripting js to add additional form element

[Rails-core] Re: [PATCH] nested resource fields_for is fail for > one nested resource

2009-04-02 Thread ara.t.howard
On Apr 2, 2:56 pm, Eloy Duran wrote: > Hi Ara, > > The patch looks great. > Could you file a ticket with the same you send in this email and   > assign it to me? > > Thanks, > Eloy we crossed paths - yes i'll create a ticket too. thanks! > > On 2 apr

[Rails-core] Re: nested resource fields_for is fail for > one nested resource

2009-04-02 Thread ara.t.howard
here's a correctly formatted patch, with tests http://gist.github.com/89436 can someone give it a whack and push? cheers. -a --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post

[Rails-core] [PATCH] nested resource fields_for is fail for > one nested resource

2009-04-02 Thread ara.t.howard
SYNOPSIS using fields_for with a nested attribute numbers the resource index incorrectly. although this does not cause an exception it does make scripting js to add additional form elements harder and more error prone than it needs to be since the form elements generated do reflect the size of

[Rails-core] Re: ar-defaults for rails 2.2.2

2009-02-16 Thread ara.t.howard
Latest approach (ar-literal) http://s3.amazonaws.com/drawohara.com.data/ar-literals.tgz # passing pure sql through to active-record is simply not supported, but # soometimes it's needed badly such as when you need to initialize a value # with a database function or provide a default as de

[Rails-core] Re: ar-defaults for rails 2.2.2

2009-02-16 Thread ara.t.howard
On Feb 15, 7:42 pm, Will Bryant wrote: > > How about not putting that column (and the meaningless NULL value) > into the INSERT statement if it is a new record on a column with a > default value function (as opposed to a default value constant, which > is the norm)?  Would that work? well, it

[Rails-core] Re: ar-defaults for rails 2.2.2

2009-02-15 Thread ara.t.howard
On Feb 14, 2:17 pm, Will Bryant wrote: > On Sun, Feb 15, 2009 at 6:59 AM, ara.t.howard wrote: > > well that is indeed true - but sometimes you absolutely need this > > functionaliy.  currently, with ar, you cannot even save a record to a > > postgresql field which is bot

[Rails-core] Re: ar-defaults for rails 2.2.2

2009-02-14 Thread ara.t.howard
On Feb 14, 2:17 pm, Will Bryant wrote: > On Sun, Feb 15, 2009 at 6:59 AM, ara.t.howard wrote: > > well that is indeed true - but sometimes you absolutely need this > > functionaliy.  currently, with ar, you cannot even save a record to a > > postgresql field which is bot

[Rails-core] Re: ar-defaults for rails 2.2.2

2009-02-14 Thread ara.t.howard
On Feb 14, 12:20 am, Gaspard Bucher wrote: > It seems this kind of code incites the use of database specific SQL > all over the place. Moving these default settings in a before_save and > extending the connection adapters (in a /lib/adapters_ext/... folder) > to get the values seems like a clea

[Rails-core] ar-defaults for rails 2.2.2

2009-02-13 Thread ara.t.howard
useful? http://drawohara.com/post/78208216/rails-activerecord-defaults-for-rails-2-2-2 a @ http://codeforpeople.com/ -- we can deny everything, except that we have the possibility of being better. simply reflect on that. h.h. the 14th dalai lama --~--~-~--~~~---

[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] acts_as_list patch

2009-01-16 Thread ara.t.howard
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 cfp:~/src/git/acts_as_list > ruby test/list_test.rb |tail .-- create_table(:mixins) -> 0.0006s -- initialize_schema_migrations_table()

[Rails-core] Re: hacking rails core classes

2008-05-23 Thread ara.t.howard
On May 24, 2008, at 12:24 AM, Michael Koziarski wrote: > Why are you munging ApplicationController? It's part of the > application so it'll get reloaded every request in dev mode, and it's > something you have control over. simply because i want to both isolate and re-use the code. for this

[Rails-core] Re: hacking rails core classes

2008-05-23 Thread ara.t.howard
On May 23, 2008, at 10:03 AM, Jan De Poorter wrote: > Maybe I'm missing something here, but as far as I know this gets > solved in plugins with Class#include > > You define your methods in a module, which you the include in > ApplicationController. That way const_missing gets called and > Applic

[Rails-core] Re: hacking rails core classes

2008-05-23 Thread ara.t.howard
On May 23, 2008, at 10:03 AM, Jan De Poorter wrote: > Maybe I'm missing something here, but as far as I know this gets > solved in plugins with Class#include > > You define your methods in a module, which you the include in > ApplicationController. That way const_missing gets called and > Applic

[Rails-core] Re: hacking rails core classes

2008-05-23 Thread ara.t.howard
On May 23, 2008, at 9:18 AM, Jan De Poorter wrote: > If you want something loaded in your application that falls beyond the > scope of default Rails stuff (for example your Core ext) you should > load it in your environment.rb file. Just put it at the bottom. > Or you can move the library from l

[Rails-core] Re: hacking rails core classes

2008-05-23 Thread ara.t.howard
On May 23, 2008, at 9:18 AM, Jan De Poorter wrote: > Dear Ara, > > Although this really is a question for rails-talk, not rails-core, > I'll just answer it here > > If you want something loaded in your application that falls beyond the > scope of default Rails stuff (for example your Core ext) y

[Rails-core] Re: [BUG?] ar inheritance

2008-01-22 Thread ara.t.howard
On Jan 22, 2008, at 5:22 PM, Michael Koziarski wrote: > I *should* know, very different apparently :) > >> did i just get lucky before? lol! > > I still am surprised it did work before, but assuming it did, and the > fix is simple, I'm happy to take a patch :) well i may be on thin ice - not

[Rails-core] Re: [BUG?] ar inheritance

2008-01-22 Thread ara.t.howard
On Jan 22, 2008, at 4:18 PM, Michael Koziarski wrote: > > AR only support single table inheritance, so what you're trying to do > won't work. set_table_name should probably raise an exception to > prevent you getting surprised like that though. > seriously? the docs say: "If you don‘t have

[Rails-core] [BUG?] ar inheritance

2008-01-22 Thread ara.t.howard
searched the tracker... but didn't manage to find something like this: >> User.table_name => "users" >> User => User(id: integer, email: string, encrypted_password: string, created_at: datetime, updated_at: datetime, remember_token: string, remember_token_expires_at: datetime) >> Pen

[Rails-core] Re: application.rb -> application_controller.rb

2008-01-18 Thread ara.t.howard
On Jan 17, 2008, at 10:06 AM, Jeremy McAnally wrote: > No, no, no! You see, if you do that then it's one step to > EigenClass::ClassFactory::ApplicationFactory::Application::Application > Space::MyApplication::Factories::ModelFactory::Interfaces::IModel > < > EigenClass::Namespace::Rails::Ap

[Rails-core] Re: application.rb -> application_controller.rb

2008-01-18 Thread ara.t.howard
On Jan 17, 2008, at 12:01 AM, Rob Sanheim wrote: > All these things smell like premature generalization to me... google for 'rails how do i setup created_by' and imagine that we had Application::Model and the normal filter chain a @ http://codeforpeople.com/ -- we can deny everything, e

[Rails-core] Re: application.rb -> application_controller.rb

2008-01-18 Thread ara.t.howard
On Jan 16, 2008, at 10:41 AM, Rick DeNatale wrote: > I kind of like this idea, although my gut instinct tells me that it > might want to follow the existing module hierarchy. > > class Application::ActionController < ::ActionController::Base > class Application::ActiveRecord::Base < ::ActiveReco

[Rails-core] Re: application.rb -> application_controller.rb

2008-01-16 Thread ara.t.howard
On Jan 16, 2008, at 8:33 AM, Pratik wrote: > > Btw, I like the idea of renaming it to Application instead of > ApplicationController, in case we *must* change it. > Application::Controller Application::Model Application::View Applcation::Config we need all these - why not just see into the fut

[Rails-core] Re: application.rb -> application_controller.rb

2008-01-16 Thread ara.t.howard
On Jan 16, 2008, at 7:24 AM, Sven Fuchs wrote: > Did that answer your question? and +2 from me. a @ http://codeforpeople.com/ -- share your knowledge. it's a way to achieve immortality. h.h. the 14th dalai lama --~--~-~--~~~---~--~~ You received this message

[Rails-core] Re: application.rb -> application_controller.rb

2008-01-13 Thread ara.t.howard
On Jan 13, 2008, at 2:00 PM, Xavier Noria wrote: > > I think it would be expected to emulate what's done with > ApplicationController. That is, the rails generator would write > >app/models/application_model.rb > > with something like > >class ApplicationModel < ActiveRecord::Base >

[Rails-core] Re: application.rb -> application_controller.rb

2008-01-13 Thread ara.t.howard
On Jan 13, 2008, at 4:54 AM, Xavier Noria wrote: > In my view ApplicationController is just about controllers, inheriting > filters, common utilities, etc. I believe any other application-wide > stuff like monkey-patching had a place in Rails pre-2, which was the > bottom of environment.rb, and

[Rails-core] Re: application.rb -> application_controller.rb

2008-01-12 Thread ara.t.howard
On Jan 12, 2008, at 4:26 PM, Michael Koziarski wrote: > The special-case nature of 'application.rb' is a bit of a smell, and > judging by the torrent of +1 votes on this ticket, there are a lot of > people who feel that way. > > http://dev.rubyonrails.org/ticket/10570 > > So, if we want to ship

[Rails-core] Re: comment systems/plugins

2008-01-12 Thread ara.t.howard
On Jan 12, 9:00 pm, "Mislav Marohnić" <[EMAIL PROTECTED]> wrote: > Ara~ > > I'm sure you meant to direct this to Rails Talk instead? > man - my address book is fubar after leopard migration... sorry for noise! -a --~--~-~--~~~---~--~~ You received this message b

[Rails-core] comment systems/plugins

2008-01-12 Thread ara.t.howard
anyone make a recommendation for a good comment system plugin? i've searched a bit and found nothing, but it sure seems like a likely candidate for a plugin. kind regards. a @ http://drawohara.com/ -- sleep is the best meditation. h.h. the 14th dalai lama --~--~-~--~~--

[Rails-core] Re: db/schema.rb

2007-11-15 Thread ara.t.howard
On Nov 13, 2007, at 9:17 PM, Stephen Touset wrote: > > Reading the Rails commit logs, I see that db/schema.rb's purpose has > been clarified. It's intended to be the authoritative location for > your database schema, and rake tasks like db:reset use it to rebuild > the schema rather than running

[Rails-core] Re: versioning strategy

2007-11-12 Thread ara.t.howard
On Nov 12, 2007, at 7:53 PM, Michael Koziarski wrote: > I can't help with a specific definition or a URL to point you at, but > in practice code which used documented apis on 1.2.x should work on > 1.2.y for all y > x. It's intended to be a drop in replacement, and > when we introduce regressio

[Rails-core] Re: versioning strategy

2007-11-12 Thread ara.t.howard
On Nov 12, 2007, at 5:35 PM, Michael Koziarski wrote: > > The changes like render_action disappearing only happened in trunk, so > you're obviously running the 'fake' 1.2.x releases which are now > labeled more clearly. bingo. thanks all - problem solved. i'm still pretty unclear about the v

[Rails-core] Re: ar validations cannot work unless transaction isolation level is serialzable

2007-11-12 Thread ara.t.howard
On Nov 10, 2007, at 3:41 AM, Jeremy Kemper wrote: > Hey Ara, a one-two punch of validates_uniqueness_of plus a unique > index on those fields gives you nice error messages in the common case > and a rare database exception otherwise. This should definitely be in > the docs. that's fair enough a

[Rails-core] versioning strategy

2007-11-12 Thread ara.t.howard
hi all- upgrading some apps from 1.2.3 -->> 1.2.5 and having all kinds of issues. lot's of functions have disappeared between versions, for instance #default_value in the pg connection adapter which breaks drysql, render_action disappearing (as indicated in past versions of course) whic

[Rails-core] Re: ar validations cannot work unless transaction isolation level is serialzable

2007-11-10 Thread ara.t.howard
On Nov 9, 2007, at 5:28 PM, Michael Koziarski wrote: > Table Level locking is kinda nasty, and a great way to kill your > throughput. If you're already creating so many 'foos' concurrently > that you're hitting this race condition, chances are you don't want to > continually lock and unlock the

[Rails-core] Re: ar validations cannot work unless transaction isolation level is serialzable

2007-11-09 Thread ara.t.howard
On Nov 9, 2007, at 3:02 PM, Michael Koziarski wrote: > > This definitely sounds like a long term option to consider, assuming > the terminology and api can be unified across all the databases etc. interesing comment from boulder/denver ruby group: "I think the problem stems largely from the Ac

[Rails-core] Re: ar validations cannot work unless transaction isolation level is serialzable

2007-11-09 Thread ara.t.howard
On Nov 9, 2007, at 3:27 PM, Michael Koziarski wrote: > > No, you still need the validation otherwise instead of a "name has > already been taken" validation error you get an internal server error. > > validates_uniqueness_of gives a nice error message, and does an ok job > at guaranteeing unique

[Rails-core] Re: ar validations cannot work unless transaction isolation level is serialzable

2007-11-09 Thread ara.t.howard
On Nov 9, 2007, at 3:02 PM, Michael Koziarski wrote: > This definitely sounds like a long term option to consider, assuming > the terminology and api can be unified across all the databases etc. i've already pulled out a ton of transaction code that supports nested transactions too - i'll see

[Rails-core] Re: ar validations cannot work unless transaction isolation level is serialzable

2007-11-09 Thread ara.t.howard
On Nov 9, 2007, at 2:04 PM, Michael Koziarski wrote: > I'm not sure that this applies to any validations other than > validates_uniqueness_of? validates_associated validates_each validates_length_of # esp if a text value is being appended to but you are right in pointing out that as t

[Rails-core] ar validations cannot work unless transaction isolation level is serialzable

2007-11-09 Thread ara.t.howard
given that this happens to be the case http://drawohara.tumblr.com/post/18926188 it seems that *any* validation should alter the behavior of Base#create to force the isolation level - otherwise validations end up being nothing be a stack of race conditions. sorry if i'm late to the pa

[Rails-core] Re: [ANN] tumblr-0.0.1

2007-11-06 Thread ara.t.howard
> >http://blog.caboo.se/articles/2007/5/1/tumblr-posting-irc-gateway-bot > > but why all this announcingness on rubyonrails-core? > > -- timbo because i fat fingered the address - supposed to go to rails list - sincerest apologies! --~--~-~--~~~---~--~~ You recei

[Rails-core] [ANN] tumblr-0.0.1

2007-11-02 Thread ara.t.howard
NAME tumblr SYNOPSIS tumblr (setup|write|read|authenticate|check-vimeo|check-audio) [options]+ DESCRIPTION tumblr.rb is a command line utility and library which interfaces to the excellent tumblr blogging platform @ http://www.tumblr.com tumblr.rb implements the complete res

[Rails-core] Re: plugin dependencies

2007-10-09 Thread ara.t.howard
On Oct 9, 2007, at 2:07 AM, Eric Hodel wrote: > You shouldn't need this anymore. With trunk (beta this week) > RubyGems: > eric - keep up the seriously great work. it's really appreciated. cheers. a @ http://codeforpeople.com/ -- it is not enough to be compassionate. you must act. h.h.

[Rails-core] Re: plugin dependencies

2007-10-08 Thread ara.t.howard
On Oct 8, 2007, at 11:35 PM, Michael Koziarski wrote: > >> it's been written, submitted, and ignored for quite a while (like > 3 >> years). here it is: > > http://dev.rubyonrails.org/attachment/ticket/8511/ > gems_loaded_from_vendor_like_plugins.2.diff > > That's where the effort's at at prese

[Rails-core] Re: plugin dependencies

2007-10-08 Thread ara.t.howard
On Oct 6, 2007, at 12:28 PM, Nathaniel Brown wrote: > What about looking at a script/gem install which installs the gem > into the load path of a vendor/gems/ directory? This could provide > the dependency requirements by leveraging what's existing. it's been written, submitted, and ignored

[Rails-core] Re: rails/ruby memory leak

2007-10-06 Thread ara.t.howard
On Oct 5, 6:34 pm, Julian Tarkhanov <[EMAIL PROTECTED]> wrote: > On 5-okt-2007, at 23:26, ara.t.howard wrote: > > > well, in all the leaks object count is steady. but i supposed it > > could be. > > exactly! method creation makes symbols, not objects I beleive

[Rails-core] Re: rails/ruby memory leak

2007-10-05 Thread ara.t.howard
On Oct 5, 2007, at 6:34 PM, Julian Tarkhanov wrote: > exactly! method creation makes symbols, not objects I beleive > probably if you keep tabs on the symbol table... an updated post and tar ball can be found here http://drawohara.tumblr.com/post/14421265 i added tracking of the number of

[Rails-core] Re: rails/ruby memory leak

2007-10-05 Thread ara.t.howard
On Oct 5, 2007, at 6:34 PM, Julian Tarkhanov wrote: > exactly! method creation makes symbols, not objects I beleive > probably if you keep tabs on the symbol table... yes i see what you are saying, however to constitute a leak the symbols generated would have to be different somehow each time

[Rails-core] Re: rails/ruby memory leak

2007-10-05 Thread ara.t.howard
On Oct 5, 2007, at 4:51 PM, Jeremy Kemper wrote: > > I tried with 1.2.4 and saw very slow rsize growth also, from 28212 -> > 28852 after 8 requests. > > I'm going to try with sessions off and a simple Session.find(:first) > in the action. > > jeremy thanks alot jeremy - the pizza trick real

[Rails-core] Re: rails/ruby memory leak

2007-10-05 Thread ara.t.howard
On Oct 5, 2007, at 3:13 PM, Julian Tarkhanov wrote: > Could that be related to method generation on fetched records? well, in all the leaks object count is steady. but i supposed it could be. a @ http://codeforpeople.com/ -- we can deny everything, except that we have the possibility of bei

[Rails-core] Re: rails/ruby memory leak

2007-10-05 Thread ara.t.howard
On Oct 4, 2007, at 3:53 PM, Jeremy Kemper wrote: > Hey Ara, I noticed you're running 1.8.6 patchlevel 0. Could you try > with the current 1.8.6? > > I hammered your test app and see rsize solidly between 20428-20532 and > object count consistently alternating between 144773 and 38070 +- 3. > > I

[Rails-core] Re: rails/ruby memory leak

2007-10-05 Thread ara.t.howard
On Oct 5, 2007, at 10:33 AM, Jeremy Kemper wrote: > I built it from the ruby_1_8 branch; that's the default patchlevel. > > For example, I just recompiled and now have > ruby 1.8.6 (2007-10-02 patchlevel 5000) [i686-darwin8.10.1] here's where i'm at 1) ruby 1.8.6 (2007-06-18 patchlevel 50

[Rails-core] Re: rails/ruby memory leak

2007-10-05 Thread ara.t.howard
On Oct 5, 2007, at 10:33 AM, Jeremy Kemper wrote: > On 10/5/07, ara.t.howard <[EMAIL PROTECTED]> wrote: >> On Oct 4, 2007, at 3:53 PM, Jeremy Kemper wrote: >>> I'm on ruby 1.8.6 (2007-05-30 patchlevel 5000) [i686-darwin8.9.1] >> >> stable-snapshot is @ 1

[Rails-core] Re: rails/ruby memory leak

2007-10-05 Thread ara.t.howard
On Oct 4, 2007, at 3:53 PM, Jeremy Kemper wrote: > I'm on ruby 1.8.6 (2007-05-30 patchlevel 5000) [i686-darwin8.9.1] got it. just compiled stable-snapshot, fresh gems, fresh rails - and i'm off and smoking my macbook... a @ http://codeforpeople.com/ -- it is not enough to be compassionate

[Rails-core] Re: rails/ruby memory leak

2007-10-05 Thread ara.t.howard
On Oct 4, 2007, at 3:53 PM, Jeremy Kemper wrote: > I'm on ruby 1.8.6 (2007-05-30 patchlevel 5000) [i686-darwin8.9.1] stable-snapshot is @ 110 where's that 5k come from? kind regards. a @ http://codeforpeople.com/ -- we can deny everything, except that we have the possibility of being bette

[Rails-core] Re: rails/ruby memory leak

2007-10-04 Thread ara.t.howard
On Oct 4, 2007, at 3:53 PM, Jeremy Kemper wrote: > > Hey Ara, I noticed you're running 1.8.6 patchlevel 0. Could you try > with the current 1.8.6? > will do. > I hammered your test app and see rsize solidly between 20428-20532 and > object count consistently alternating between 144773 and 3807

[Rails-core] Re: rails/ruby memory leak

2007-10-04 Thread ara.t.howard
On Oct 4, 2007, at 12:14 AM, Michael Koziarski wrote: > >> testing against svn rails shows file and cookie stores not leaking >> but >> activerecord store continuing to leak. > > So it's not my new attribute code I did enjoy the benchmarks you > published though ... yeah it looks like we

[Rails-core] Re: rails/ruby memory leak

2007-10-02 Thread ara.t.howard
> > What rev are you testing? Does it include my new attributes code? > That broke ARStore initially... > testing against svn rails shows file and cookie stores not leaking but activerecord store continuing to leak. --~--~-~--~~~---~--~~ You received this mess

[Rails-core] Re: rails/ruby memory leak

2007-10-02 Thread ara.t.howard
On Oct 1, 4:27 pm, "Michael Koziarski" <[EMAIL PROTECTED]> wrote: > > so far, after > 100,000 requests neither FileStore or SQLSessionStore > > are not leaking. only ActiveRecordStore is... > > What rev are you testing? Does it include my new attributes code? > That broke ARStore initially...

[Rails-core] Re: rails/ruby memory leak

2007-10-01 Thread ara.t.howard
> > What rev are you testing? cfp:~ > rails --version Rails 1.2.3 cfp:~ > ruby --version ruby 1.8.6 (2007-03-13 patchlevel 0) [i686-darwin8.9.1] cfp:~ > uname -srm Darwin 8.10.1 i386 cfp:~ > gem list sqlite3 *** LOCAL GEMS *** sqlite3-ruby (1.2.1) SQLite3/Ruby is a module to allow Rub

[Rails-core] Re: rails/ruby memory leak

2007-10-01 Thread ara.t.howard
> > that's very interesting indeed. i'm just about do confirm that the > normal file based sessions do not leak and also test stephan kaas' > alternate db backed sessions. if both do not leak i can narrow my > search to rails' activerecord store. if either do i'll be 99% sure > the leak is in

[Rails-core] Re: rails/ruby memory leak

2007-10-01 Thread ara.t.howard
On Oct 1, 2:14 pm, "Piyush Ranjan" <[EMAIL PROTECTED]> wrote: > Just a thought : I do not use sessions in most of my critical applications > which need to serve more than 10K req/sec (a magic no. I have zeroed upon). > I rely on a completely cookie based authentication system which AFAIK is > qu

[Rails-core] Re: rails/ruby memory leak

2007-10-01 Thread ara.t.howard
> > About a month ago I've found similar (or, probably, same) leak while > checking our application for leaks. It leaks very slow. And it's seems > to be not Rails issue. Something with $1, $2, ... variable handling in > ruby itself. I think I still have those valgrind report files at home. > > I

[Rails-core] Re: rails/ruby memory leak

2007-10-01 Thread ara.t.howard
On Oct 1, 2007, at 5:54 AM, Aleksey Kondratenko wrote: > > About a month ago I've found similar (or, probably, same) leak while > checking our application for leaks. It leaks very slow. And it's seems > to be not Rails issue. Something with $1, $2, ... variable handling in > ruby itself. I think

[Rails-core] rails/ruby memory leak

2007-09-30 Thread ara.t.howard
hi all i've been chasing my tail on a tiny memory leak for a few days. i isolated the cause to what amounts to a rails project with database sessions enabled. now i'm not sure that the leak is in rails, in fact i think it's in ruby's cgi/session.rb but i want to gather a few data points to conf

[Rails-core] Re: sane transaction semantics

2007-09-27 Thread ara.t.howard
On Sep 27, 2007, at 12:55 AM, Jeremy Kemper wrote: > I hope you contribute your work to #5457. Incremental, fully-tested > changes to the existing API are most welcome. The underlying features > your propose are solid and needn't be roaming the countryside tilting > at sanitoriums ;) > sure thi

[Rails-core] Re: sane transaction semantics

2007-09-26 Thread ara.t.howard
On Sep 26, 2007, at 6:26 PM, Frederick Cheung wrote: > Hmm. If the adaptor methods were private the ActiveRecord itself > couldn't call them. In general, adaptor methods are sort of down > their and grungy. > If you don't use the adaptor methods then the nesting and so on just > works > that is

[Rails-core] Re: sane transaction semantics

2007-09-26 Thread ara.t.howard
On Sep 26, 2007, at 5:27 PM, Frederick Cheung wrote: > > I think you are correct in assuming this is your problem. bits of > create are wrapped in a transaction (eg so that the callbacks either > run or don't etc... > sqlite doesn't allow nested transaction, by using > ActiveRecord::Base.connect

[Rails-core] Re: sane transaction semantics

2007-09-26 Thread ara.t.howard
On Sep 26, 2007, at 4:53 PM, Michael Koziarski wrote: > > What do you mean by 'rolling back' model creation. The transaction > should definitely be aborted. The database should be left as it was > before. If not, you've found a bug for which test cases would be > greatly appreciated ;) hey

[Rails-core] Re: scraping schema

2007-07-29 Thread ara.t.howard
On Jul 27, 2007, at 11:12 AM, Josh Susser wrote: > Gentle reminder to take this discussion to rubyonrails-talk, since > you're not talking about changes to core. thanks. that way where i'd intended it... sorry for noise! a @ http://drawohara.com/ -- we can deny everything, except that we hav

[Rails-core] scraping schema

2007-07-27 Thread ara.t.howard
anyone out there seen something that scrapes a db schema to automatically determine ar relationships? thanks. a @ http://drawohara.com/ -- we can deny everything, except that we have the possibility of being better. simply reflect on that. h.h. the 14th dalai lama --~--~-~--~---

[Rails-core] Re: set_default_values rocket science - continuing after_initialize/after_find misfeature

2007-07-25 Thread ara.t.howard
On Jul 25, 2007, at 8:37 AM, James H. wrote: > > What kind of use cases are you expecting where this sort of behavior > is desirable? I think I'm coming up short on experience to imagine > one. i've got about ten right now, a few of them spelled out here http://drawohara.tumblr.com/post/66

[Rails-core] Re: set_default_values rocket science - continuing after_initialize/after_find misfeature

2007-07-24 Thread ara.t.howard
On Jul 24, 2007, at 7:30 PM, Pratik wrote: > > Just starting a new thread so that it's easy to follow. > > I just submitted a patch at trac to add a new class method called > "set_default_values" ( not a great name I think ), which lets you do > all kinds of crazy stuff with setting default valu

[Rails-core] Re: after_initialize/after_find misfeature

2007-07-24 Thread ara.t.howard
On Jul 24, 2007, at 2:50 PM, Michael Koziarski wrote: > Every feature that we add, becomes something we need to support on an > ongoing basis, for the foreseeable future. So we have to have a > reject by default, or we'll end up with another 'components'. i hear that. i put up a summary of wh

[Rails-core] Re: after_initialize/after_find misfeature

2007-07-24 Thread ara.t.howard
On Jul 24, 2007, at 2:50 PM, Michael Koziarski wrote: > > Sorry for replying to myself, but the wireless here is a little too > spotty to reply to all the individual threads. > > Providing a method to allow static defaults such as: > > set_default_values :foo=>'bar' > > Is just reimplementing th

[Rails-core] Re: after_initialize/after_find misfeature

2007-07-24 Thread ara.t.howard
On Jul 24, 2007, at 2:50 PM, Michael Koziarski wrote: > > For dynamic defaults, such as 'the default value for the categories on > a blog, is taken from the account's default values' I've not seen a > case that can't be catered for by overriding the initialize method. > > Requiring users to call

[Rails-core] Re: after_initialize/after_find misfeature

2007-07-24 Thread ara.t.howard
On Jul 24, 2007, at 2:50 PM, Michael Koziarski wrote: > > On 7/23/07, Michael Koziarski <[EMAIL PROTECTED]> wrote: > >> Without cases which >> can't be solved by this pattern, I'm not sure that adding a new >> callback is justified. > > Sorry for replying to myself, but the wireless here is a li

[Rails-core] Re: after_initialize/after_find misfeature

2007-07-24 Thread ara.t.howard
On Jul 24, 2007, at 1:33 PM, Pratik wrote: > > http://pastie.caboo.se/81829 > > That's my proposed solution. my take is that is HAS to be a method so that self.foobar = self.foo + self.bar which is very hard to do with a hash based mechanism (i realize mine is hash based too!) so, to me

[Rails-core] Re: after_initialize/after_find misfeature

2007-07-24 Thread ara.t.howard
On Jul 24, 2007, at 12:00 PM, Piers Cawley wrote: > Except that, when you're setting defaults, you really would like to > interpose some behaviour between the bit that gets the object to the > point where the various setter/getter methods will work and the bit > where ActiveRecord calls self.att

[Rails-core] Re: after_initialize/after_find misfeature

2007-07-24 Thread ara.t.howard
On Jul 24, 2007, at 11:15 AM, Pratik wrote: > Anyways, I'm off this thread unless we see some patches. That makes > arguing a lot easier :-) --- vendor/rails/activerecord/lib/active_record/base.rb.org 2007-07-24 11:37:07.0 -0600 +++ vendor/rails/activerecord/lib/active_record/base

[Rails-core] Re: after_initialize/after_find misfeature

2007-07-24 Thread ara.t.howard
On Jul 24, 2007, at 11:15 AM, Pratik wrote: > > Umm...what would you suggest as alternative for > before/after_add/remove association collection callbacks ? i'm not suggesting an alternative, i saying that just because docs *can* take the place of easy code doesn't mean they should. i'd just

[Rails-core] Re: after_initialize/after_find misfeature

2007-07-24 Thread ara.t.howard
On Jul 22, 2007, at 4:39 PM, Michael Koziarski wrote: > > I can buy your argument, but if I do so, there doesn't seem to be a > need for after_initialize: > > def initialize(attrs) > do_stuff > super > end one other nit-pick: it's somewhat archaic and java like to __require__ client code

[Rails-core] Re: after_initialize/after_find misfeature

2007-07-24 Thread ara.t.howard
On Jul 22, 2007, at 4:39 PM, Michael Koziarski wrote: > > I can buy your argument, but if I do so, there doesn't seem to be a > need for after_initialize: > > def initialize(attrs) > do_stuff > super > end > > All we'd be doing is reinventing an initialize method which hid the > arguments.

[Rails-core] Re: after_initialize/after_find misfeature

2007-07-24 Thread ara.t.howard
On Jul 23, 2007, at 7:14 PM, Pratik wrote: > Why add a new callback when all you need is 4 lines of documentation > on how to do it ? because you can say that about all of the callbacks. a @ http://drawohara.com/ -- we can deny everything, except that we have the possibility of being better.

[Rails-core] Re: Namespaced model valid #to_xml support in ActiveRecord, ActiveSupport and ActiveResource

2007-05-23 Thread ara.t.howard
On May 23, 2007, at 5:57 PM, Michael Koziarski wrote: > >> http://dev.rubyonrails.org/ticket/8305 >> http://dev.rubyonrails.org/ticket/8308 > > An XML namespace has to be declared to be valid xml, so the patches > submitted seem to leave us in the same situation where .to_xml will > produce inva

[Rails-core] Re: slow components?

2007-05-23 Thread ara.t.howard
On May 22, 2007, at 10:50 PM, Michael Koziarski wrote: > > Stefan kaes would be the guy to talk to about this. > > While performance is / was a concern, it was not a reason for our lack > of enthusiasm for component based web development. So a solution to > any performance issues is unlikely to

[Rails-core] Re: slow components?

2007-05-23 Thread ara.t.howard
On May 22, 2007, at 10:50 PM, Michael Koziarski wrote: > > Stefan kaes would be the guy to talk to about this. > > While performance is / was a concern, it was not a reason for our lack > of enthusiasm for component based web development. So a solution to > any performance issues is unlikely to

[Rails-core] slow components?

2007-05-20 Thread ara.t.howard
hi- contrary to what i've read, i've been unable to show that components are, in fact, slower than any other rendering process: ### a simple controller cfp:~/src/ruby/componentry/componentry-0.0.0/sample/rails > cat app/ controllers/bar_controller.rb class BarController < ApplicationControll

[Rails-core]

2007-05-20 Thread ara.t.howard
test. please ignore. -a -- we can deny everything, except that we have the possibility of being better. simply reflect on that. h.h. the 14th dalai lama --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Ruby on

[Rails-core] re-inventing components

2007-05-18 Thread ara.t.howard
I would love feedback from the community before releasing into the wild: http://drawohara.tumblr.com/post/2070878 Kind regards. -a -- we can deny everything, except that we have the possibility of being better. simply reflect on that. h.h. the 14th dalai lama --~--~-~--~~

[Rails-core] Re: migrations based on timestamps

2007-04-16 Thread Ara.T.Howard
On Mon, 16 Apr 2007, François Beausoleil wrote: > 2007/4/14, Ara.T.Howard <[EMAIL PROTECTED]>: >> in otherwords using an actual timestamp like >>2007-04-14T15:04:28 > > Yes, but the file's ctime essentially gives us the same information, > plus or minus a

[Rails-core] Re: migrations based on timestamps

2007-04-14 Thread Ara.T.Howard
On Sat, 14 Apr 2007, François Beausoleil wrote: > Hi, > > 2007/4/13, hemant <[EMAIL PROTECTED]>: I have been [trying] to use migrations with UNIX timestamps, so multiple developers can add migrations without tipping on each others toe. >>> >>> why not simply add an iso8601 timestam

[Rails-core] Re: migrations based on timestamps

2007-04-13 Thread Ara.T.Howard
On Fri, 13 Apr 2007, hemant wrote: > > I have been [trying] to use migrations with UNIX timestamps, so > multiple developers can add migrations without tipping on each others > toe. why not simply add an iso8601 timestamp to the migration name? that way the semantics of timestamps can be gained