[Rails-core] implicit templates in ActionMailer broken due to change in ActionView

2006-03-18 Thread Andrew Kaspick
Hello, I've been using edge rails for a while now and used the recipe from the new recipes book on using implicit file names for multipart/alternative messages. This seems to have recently broke. I've named by templates according to the book and the docs... # for example, if the following templ

[Rails-core] bug in :through associations?

2006-03-22 Thread Andrew Kaspick
Hi there, I've recently started using the :through option on has_many associations and for the most part I've had no issues, but I've seemed to run into a bit of a roadblock with a specific case outlined below. I'm not sure if this is a bug in the feature or simply lack of user understandings. A

Re: [Rails-core] bug in :through associations?

2006-03-22 Thread Andrew Kaspick
ld be a nicer option. On 3/22/06, Mark James <[EMAIL PROTECTED]> wrote: > Andrew Kaspick wrote: > > > Now if I change the name of my association from user to player... > > > > class PlayerStatistic < ActiveRecord::Base > > belongs_to :game > > bel

Re: [Rails-core] bug in :through associations?

2006-03-22 Thread Andrew Kaspick
Another thought is improving the message returned from the exception to give a better hint as to why the error is occuring. On 3/22/06, Andrew Kaspick <[EMAIL PROTECTED]> wrote: > Alright, what you suggested works pefectly. > > As you said, I found this confusing. I had things wor

[Rails-core] Bug with "cascaded" find's in ActiveRecord ?

2006-03-23 Thread Andrew Kaspick
Hello, I came across what I believe is to be a bug in ActiveRecord with the latest revision of edge rails. Basically what the problem deals with is any passed options to a secondary find which are being modified internally when I believe they shouldn't be. Further explanation is easiest with cod

Re: [Rails-core] Bug with "cascaded" find's in ActiveRecord ?

2006-03-23 Thread Andrew Kaspick
Yes, I did that and works, just seems like a "hack" to an underlying issue. Currently the solutions you proposed is what I have done, but it took some time to figure it out. On 3/23/06, Rick Olson <[EMAIL PROTECTED]> wrote: > On 3/23/06, Andrew Kaspick <[EMAIL PROTEC

Re: [Rails-core] Bug with "cascaded" find's in ActiveRecord ?

2006-03-23 Thread Andrew Kaspick
My last response was to Rick's message, not Mark's. I'll blame gmail for the confusion. :) Mark's response looks to be correct. On 3/23/06, Andrew Kaspick <[EMAIL PROTECTED]> wrote: > Yes, I did that and works, just seems like a "hack" to an underlyin

[Rails-core] comment on new :select support for with_scope

2006-03-26 Thread Andrew Kaspick
Hi there, I noticed that :select has been added as a supported keyword for with_scope. I created a patch at http://dev.rubyonrails.org/ticket/4132 for adding :include support to with_scope because of issues I was having with using just :joins and the lack of :select support. The reason I created

Re: [Rails-core] comment on new :select support for with_scope

2006-03-26 Thread Andrew Kaspick
> > So my question is... were my assumptions wrong (ie. my reasonings for > > implementing :include) and will :include just not be supported and > > should I just use the :select, :join combonation from this point? > > I understand the mechanics of the patch, but not the benefit. What's > the use c

Re: [Rails-core] comment on new :select support for with_scope

2006-03-26 Thread Andrew Kaspick
On 3/26/06, Michael Koziarski <[EMAIL PROTECTED]> wrote: > > The reason I created this patch is explained in the ticket and that I > > figured the :include route was a bit cleaner from a users perspective > > than a combo of :select and :joins. > > The patch no longer applies cleanly, and seems to

Re: [Rails-core] comment on new :select support for with_scope

2006-03-26 Thread Andrew Kaspick
On 3/26/06, Andrew Kaspick <[EMAIL PROTECTED]> wrote: > On 3/26/06, Michael Koziarski <[EMAIL PROTECTED]> wrote: > > > The reason I created this patch is explained in the ticket and that I > > > figured the :include route was a bit cleaner from a users perspective

Re: [Rails-core] comment on new :select support for with_scope

2006-03-26 Thread Andrew Kaspick
On 3/26/06, Andrew Kaspick <[EMAIL PROTECTED]> wrote: > On 3/26/06, Andrew Kaspick <[EMAIL PROTECTED]> wrote: > > On 3/26/06, Michael Koziarski <[EMAIL PROTECTED]> wrote: > > > > The reason I created this patch is explained in the ticket and that I >

Re: [Rails-core] Armageddon?

2006-04-21 Thread Andrew Kaspick
I see no point in holding back either. I was at CoR as well and saw the same stuff. I thought it was cool, but it's not as groundbreaking as you might think. Comet uses iframe hacks and armageddon uses a flash "hack". Yes, I said hack. :) Although the solution looks much cleaner, I don't belie

Re: [Rails-core] before_find

2006-04-22 Thread Andrew Kaspick
Implement your own find, do whatever you like to the parameters and then call the main ActiveRecord find. Look into the alias method. On 22 Apr 2006 23:09:07 -, Kevin Olbrich <[EMAIL PROTECTED]> wrote: > Well, what I'm thinking of would be more like a class-level before_find. > I'd like to in

Re: [Rails-core] Worth submitting enhancements?

2006-04-29 Thread Andrew Kaspick
I've implemented the same thing for my own projects and you can pretty much move that pattern into the remote_function method to take care of any remote call. I allow the progress indicator to be optional and I have a seperate helper that allows the user to place the indicator wherever they want

Re: [Rails-core] Worth submitting enhancements?

2006-04-29 Thread Andrew Kaspick
To add a bit more to this, I also added some code to (optionally) disable a form while a remote call is in progress and re-enable it when the action is complete. This way a user can't hammer away at a form that's already been submitted. On 4/29/06, Andrew Kaspick <[EMAIL PROT

Re: [Rails-core] Worth submitting enhancements?

2006-05-01 Thread Andrew Kaspick
Ok, I'm sure we can do that for you. :) Hey David... fire me off an email and we can look into merging our solutions into a plugin and then releasing it to the masses. Hey Dylan... stay tuned. :) On 5/1/06, Dylan Stamat <[EMAIL PROTECTED]> wrote: So David and Andrew, please post your code and

Re: [Rails-core] Worth submitting enhancements?

2006-05-01 Thread Andrew Kaspick
f you have anything similar or improvements on this, I'd be happy to integrate them. Dylan... take a look and let me know if this looks useful to you. Thanks, Andrew On 5/1/06, Andrew Kaspick <[EMAIL PROTECTED]> wrote: Ok, I'm sure we can do that for you. :) Hey David... fire me of

Re: [Rails-core] Understanding Active Records innards

2006-06-29 Thread Andrew Kaspick
Why not just implement some ActiveRecord patches? Seems like a good way to learn how it works while helping improve the code base. On 6/29/06, Peter Michaux <[EMAIL PROTECTED]> wrote: Hi, I've used Rails quite a bit. I want to understand the major Rails components well enough to read the Rails

Re: [Rails-core] Understanding Active Records innards

2006-06-29 Thread Andrew Kaspick
With the rate at which Rails is changing and a good chunk of the agile rails book needing quite an overhaul to be updated to the current version, wouldn't chapters in a book on the actual implementation of (parts of) rails be even more prone to going out of date? Writing a book that contains this

Re: [Rails-core] Improving ActionController Filters

2006-07-02 Thread Andrew Kaspick
I've definitely had a need for more improved around and after filters. If an action is cached, any after or around filters will not execute as processing is basically halted after the cached page is served. It would be nice to have filters that are guaranteed to run regardless of whatever happens

Re: [Rails-core] Improving ActionController Filters

2006-07-05 Thread Andrew Kaspick
before_action stuff failed > end > end > > This way when the action returns, it should run. If this is not the case, please let me know a test case I could use to make sure this will work in the new system. > > -Martin > > > On 7/2/06, Julian 'Julik' Tarkhanov

[Rails-core] plugins playing nice together

2006-07-21 Thread Andrew Kaspick
Hello, I have a question about plugins playing nice together when you have more than one plugin that attempts to override the same rails method. In my case I have written a plugin that provides it's own form_remote_tag implementation, but I also have another plugin installed that does the same t

Re: [Rails-core] plugins playing nice together

2006-07-21 Thread Andrew Kaspick
Thanks for the info, that helps a lot. On 7/21/06, Caio Chassot <[EMAIL PROTECTED]> wrote: Quick corrections: > MyPlugin::MyModule that would be: module MyPlugin::MyModule > You can also hook up to the method_defined ruby callback I meant method_added, as seen in the example code (whic

Re: [Rails-core] Adding :having to Active Record

2006-08-05 Thread Andrew Kaspick
From the OP's message "This has reached stability and now works with eager loading and scopings," On 8/5/06, Blake Watters <[EMAIL PROTECTED]> wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 The other thing that occurs to me is that I can imagine wanting :having to be subject to scop

Re: [Rails-core] Adding :having to Active Record

2006-08-05 Thread Andrew Kaspick
n't illustrating a viable point or contributing to the discussion. On Aug 5, 2006, at 1:54 PM, Andrew Kaspick wrote: >> From the OP's message > > "This has reached stability and now works with eager loading and > scopings," > > On 8/5/06, Blake Watters <

[Rails-core] documentation

2006-08-08 Thread Andrew Kaspick
Hello, Just thought I'd make a remark regarding documentation. The submission process for patches doesn't mention updating associated documentation (as far as I can see). This should also be a requirement along with test cases so that documentation stays up to date. If we're planning on having

[Rails-core] reloading dynamic classes

2006-08-09 Thread Andrew Kaspick
Hello all, I'm having a problem with some dynamic classes that I'm trying to use in my development environment. My app is creating some dynamic classes that descend from ActiveRecord::Base. Now this part works fine, except that they only exist for the life of one request in my development envir

Re: [Rails-core] reloading dynamic classes

2006-08-09 Thread Andrew Kaspick
loaded via const_missing will be unloaded. Upgrading to trunk should solve your problem, but it's pretty fresh code. I'm not saying it's full of bugs, but it's not guarenteed to be as solid as you might expect. On 8/9/06, Andrew Kaspick <[EMAIL PROTECTED]> wrote: > Hello

Re: [Rails-core] reloading dynamic classes

2006-08-09 Thread Andrew Kaspick
Thanks, but I need something that works in 1.1.5 and not edge. Although, looking at the code for Dispatcher.to_prepare did give me an idea that turned out to work for me. Thanks again, Andrew On 8/9/06, Rick Olson <[EMAIL PROTECTED]> wrote: On 8/9/06, Andrew Kaspick <[EMAIL PROTECTE

Re: [Rails-core] [ann] Super DRY models - Auto-associations and validations

2006-08-14 Thread Andrew Kaspick
I would agree that this is a nice way to get started with your models, but once you need to do anything beyond the basics, like association extensions for example, even simply renaming the association, then you'll have to define the association anyway. Nice idea, but I'd rather see this remain as