[Rails-core] accepts_nested_attributes_for, validations, :inverse_of option on associations, and IdentityMap

2011-04-07 Thread Rick DeNatale
ributes from being overwritten by queries. I haven't dug through the InstanceMap code enough yet to see if that is the case. I'm loath to move to edge just to try this. Any advice from the core-savvy guys. -- Rick DeNatale Blog: http://talklikeaduck.denhaven2.com/ Github: http://

[Rails-core] Should includes with general association name work?

2011-01-11 Thread Rick DeNatale
know, but it didn't make a difference. Is there, or should there, be a way in such a case to force includes to generate the join as well as instantiating the associated records? -- Rick DeNatale Blog: http://talklikeaduck.denhaven2.com/ Github: http://github.com/rubyredrick Twitter: @RickDeNa

Re: [Rails-core] Default Test library

2010-06-14 Thread Rick DeNatale
you are subscribed to the Google Groups > "Ruby on Rails: Core" group. > To post to this group, send email to rubyonrails-c...@googlegroups.com. > To unsubscribe from this group, send email to > rubyonrails-core+unsubscr...@googlegroups.com. > For more options, visit this group at &g

[Rails-core] Route globbing in Rails 3 beta 3

2010-04-28 Thread Rick DeNatale
orum, :action => :show, :conditions => {:method => :get} Is this an intentional change or a bug? I do see it's documented that way in the edge version of http://guides.rails.info/routing.html#route-globbing So I guess its intentional, but just wanted to make sure. -- Rick DeNa

Re: [Rails-core] Introducing Object#self

2010-04-10 Thread Rick DeNatale
is IMHO a much better method name. By way of explanation, a semicolon after a message invocation indicates that the subsequent message is sent to the receiver of the preceding message, instead of the result of that mesage. so the above would be equivalent to: tmp = Point.new tmp x: 1 tmp y: 2 pt

Re: [Rails-core] railsdav - help

2010-01-03 Thread Rick DeNatale
understand. I submitted a patch to allow controlled addition of http methods to the rails stack some 7 months ago https://rails.lighthouseapp.com/projects/8994/tickets/2809-patch-allowed-controlled-addition-of-new-http-methods But it seems to have escaped notice. It's probably not still up to

Re: [Rails-core] Re: proposing Object#nonblank? (analogous to Ruby's Numeric#nonzero?)

2009-12-28 Thread Rick DeNatale
fectly good, and true return value from a predicate, and in many cases more useful. Insisting that a predicate return either true or false, smells more Java or C++ish than Rubyish to me. But what do I know? -- Rick DeNatale Blog: http://talklikeaduck.denhaven2.com/ Twitter: http://

[Rails-core] Re: Preserving has_many :through ids assignment order

2009-11-14 Thread Rick DeNatale
ou add the function to reorder the routes? If it were me I'd probably do something like adding a position attribute to route and use something like acts_as_list -- Rick DeNatale Blog: http://talklikeaduck.denhaven2.com/ Twitter: http:/

[Rails-core] Re: script/generate broken on vendored rails2.3.4 project

2009-10-30 Thread Rick DeNatale
I tracked it down. The problem was being caused by the log_buddy gem http://github.com/relevance/log_buddy This adds a logger method to Object which clobbers the Rails generator script commands logger. That cost me an hour or two. On Fri, Oct 30, 2009 at 1:06 PM, Rick DeNatale wrote: > I

[Rails-core] Re: script/generate broken on vendored rails2.3.4 project

2009-10-30 Thread Rick DeNatale
So the following seems to only happen when I run script/generate under ruby 1.9.1 If I use 1.8.7 script/generate works! On Fri, Oct 30, 2009 at 1:06 PM, Rick DeNatale wrote: > I was trying to add cucumber to a project which is using rails2.3.4 > (which is vendored).   The script/ge

[Rails-core] script/generate broken on vendored rails2.3.4 project

2009-10-30 Thread Rick DeNatale
able to figure out where it's set and what has gone wrong. Any ideas? -- Rick DeNatale Blog: http://talklikeaduck.denhaven2.com/ Twitter: http://twitter.com/RickDeNatale WWR: http://www.workingwithrails.com/person/9021-rick-denatale LinkedIn: http://www.linkedin.com/in/rickdenatale --~--~--

[Rails-core] Re: down migrations could be stored in db?

2009-09-09 Thread Rick DeNatale
the bejesus out of me, but maybe that's just me. > If there's another case I'd be happy to re-evaluate but the power of > migrations is in their simplicity they're not some darcs-ish patch > algebra for DDL, they're little scripts that you run in order in which &g

[Rails-core] Re: Reasoning for not supporting ruby 1.8.6 in Rails 3.0

2009-09-09 Thread Rick DeNatale
or Rails 3 is to provide support for 1.8.7+, and I think that that's the right thing to do, in order to allow Rails, Ruby and the sea of open source which comprises the Ruby landscape progress and evolve. -- Rick DeNatale Blog: http://talklikeaduck.denhaven2.com/ Twitter: http://twitter.com/R

[Rails-core] Re: Reasoning for not supporting ruby 1.8.6 in Rails 3.0

2009-09-09 Thread Rick DeNatale
ich require it, for which migration to a newer version is not justifiable. For a new app, particularly one written to Rails 3, I'd probably just start with Ruby 1.9. I'm still not convinced that 1.8.7 is either fish or fowl. -- Rick DeNatale Blog: http://talklikeaduck.denhaven2.com

[Rails-core] Re: Fwd: Behaviour of ActiveSupport::Duration when added together

2009-09-05 Thread Rick DeNatale
hs) > > Any reason for that? Because a duration in fact represents a series of steps to increment a date/time/datetime and it's useful to differentiate between (x.months + y.months) and (x+y).months Think of the + when adding durations as if it were 'then' -- Rick DeNata

[Rails-core] Re: Fwd: Behaviour of ActiveSupport::Duration when added together

2009-08-31 Thread Rick DeNatale
. You need to look at the code to understand this, Duration is a bit tricky since it acts as a proxy to it's value, it's implemented as a subclass of BasicObject and forwards anything it doesn't have a method for to the value, so it reports it's class as Fixnum, or BigInteger, and i

[Rails-core] Re: A resource named "image" gives problems

2009-08-29 Thread Rick DeNatale
nerate helpers to generate the related uris, so you get x_path, and x_url, but if x is image or javascript or ... then you will only see one say image_tag helper, and apparently it's the one for the static asset. -- Rick DeNatale Blog: http://talklikeaduck.denhaven2.com/ Twitter: http://twitt

[Rails-core] Re: Possible parsing weirdness

2009-06-30 Thread Rick DeNatale
ay, most rubyists would write this: logger.info 'request is an email (' + email.to_s + ')' using string interpolation: logger.info "request is an email (#{email})" -- Rick DeNatale Blog: http://talklikeaduck.denhaven2.com/ Twitter: http://twitter.com/RickDeNatale

[Rails-core] [PATCH] Allowed controlled addition of new http methods (was Approaches to WebDav/CalDav on Rails, today and tomorrow.)

2009-06-16 Thread Rick DeNatale
Putting my money where my mouth is: https://rails.lighthouseapp.com/projects/8994/tickets/2809 -- Rick DeNatale Blog: http://talklikeaduck.denhaven2.com/ Twitter: http://twitter.com/RickDeNatale WWR: http://www.workingwithrails.com/person/9021-rick-denatale LinkedIn: http://www.linkedin.com

[Rails-core] Re: Approaches to WebDav/CalDav on Rails, today and tomorrow.

2009-06-15 Thread Rick DeNatale
On Mon, Jun 15, 2009 at 1:16 AM, Matt Jones wrote: > > > On Jun 14, 2009, at 11:42 PM, Rick DeNatale wrote: >> Now in googling about, I discover that there's a railsdav plugin whose >> usage I don't entirely understand. >> >> One thing it does is to

[Rails-core] Approaches to WebDav/CalDav on Rails, today and tomorrow.

2009-06-14 Thread Rick DeNatale
7;d like to be able to route requests to different controllers/actions the same way I can do with normal http rest schemes. Thoughts? -- Rick DeNatale Blog: http://talklikeaduck.denhaven2.com/ Twitter: http://twitter.com/RickDeNatale WWR: http://www.workingwithrails.com/person/9021-rick-denatale

[Rails-core] Re: Class.subclasses vs. ActiveRecord::Base.subclasses, curiosity or bug?

2008-09-04 Thread Rick DeNatale
On Fri, Aug 29, 2008 at 9:43 PM, Jeremy Kemper <[EMAIL PROTECTED]> wrote: > > On Fri, Aug 29, 2008 at 4:29 PM, Rick DeNatale <[EMAIL PROTECTED]> > wrote: > > I ran into an interesting curiosity today when a whole bunch of our tests > > started breaking mysteriou

[Rails-core] Class.subclasses vs. ActiveRecord::Base.subclasses, curiosity or bug?

2008-08-29 Thread Rick DeNatale
the AR method is there to support STI and related stuff. On the surface it would seem that there are one or more potential bugs lurking here, but I'm not sure, so I thought I'd ask those wiser in the arcana of Rails history. -- Rick DeNatale My blog on Ruby

[Rails-core] Re: ActiveModel::Validatable(Total Rewrite, Totally Awesome) - Request for comment on work in progress (NOW WITH TL;DR)

2008-07-10 Thread Rick DeNatale
was taking more time than it was worth. If the new implementation leaves more clues on the invocation stack in these cases, I'd be all for it. Another benefit of what I'm reading is that it would make validations reflectable which would help in writing TDD/BDD assertions/matchers that

[Rails-core] Re: Strange validation failure on Rails 2.1

2008-06-26 Thread Rick DeNatale
Some of the changes, particularly in ActiveRecord have subtle, but drastically changed behavior in ways that bedevil more sophisticated Rails apps. The change in the implementation of eager loading is another thing which is making the port a bigger issue than we tho

[Rails-core] Strange validation failure on Rails 2.1

2008-06-25 Thread Rick DeNatale
lidation fails since the just created MembershipRole with the particular membership and role ids exists in the DB. This code all worked fine on Rails 2.0.2, something in Rails 2.1 is causing this spurious validation. I'd welcome any ideas on h

[Rails-core] named_scope doesn't check for critical method names.

2008-06-12 Thread Rick DeNatale
rate a stub method which apparently caused public to be called internally by Ruby, at which time the named_scope generated method failed. See the ticket for details. I'm not sure what the fix should be, but I think that named_scope should not cause public/private, and the like to be clobbered. -

[Rails-core] Re: Problems with schema.rb?

2008-06-06 Thread Rick DeNatale
27;s showing bigint(10). I assume you ran the migration by running rake db:migrate. This only affects the development environment unless you specify the RAILS_ENV environment value to override it. (rake RAILS_ENV=test db:migrate) But you can also use rake db:test:prepare to c

[Rails-core] Rails 2.1RC1 rake db:test:clone_structure blowing up with lots of migrations

2008-05-15 Thread Rick DeNatale
More on this at http://talklikeaduck.denhaven2.com/articles/2008/05/15/rails-2-1rc1-and-the-enhanced-migrations-plugin -- Rick DeNatale My blog on Ruby http://talklikeaduck.denhaven2.com/ --~--~-~--~~~---~--~~ You received this message because you are subscribe

[Rails-core] Re: time_zone_select: UTC or GMT?

2008-05-15 Thread Rick DeNatale
ut giving preferences to US timezones in selection helpers should also have an objection to GMT vs. UTC. It's actually now mostly used as the name for the timezone used during the winter months in the UK rather than as the reference point for time zones. -- Rick DeNatale My blog on Ruby

[Rails-core] Re: The thing with Rails 2.0.991 version number

2008-05-13 Thread Rick DeNatale
and the odd-numbered be the > "experimental", why couldn't Rails? Well Ruby used to use that convention, but Matz did away with it with 1.9, Ruby versioning now has x.y.0 as "experimental/development" and x.y.[123456789] as "production". Ruby 1.9.1 (whenever

[Rails-core] Status of Ticket 11091?

2008-02-25 Thread Rick DeNatale
ike to get this into trunk if possible. -- Rick DeNatale My blog on Ruby http://talklikeaduck.denhaven2.com/ --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to this

[Rails-core] Need help fixing test for integration testing patch, did route optimization break with_routes perhaps?

2008-02-18 Thread Rick DeNatale
. Any advice from those more wizened in the ways of testing the rails test infrastructure code? I suspect that this might be a problem the route optimization logic but I haven't been able to pin it down. -- Rick DeNatale My blog on Ruby http://talklikeaduck.denhaven2.com/ --~--~--

[Rails-core] Re: Funny behavior with Fixtures... on Ubuntu..

2008-02-13 Thread Rick DeNatale
On 2/13/08, Rick DeNatale <[EMAIL PROTECTED]> wrote: > Try setting use_transactional_fixtures to fall and see if it makes a > difference. s/fall/false/ -- Rick DeNatale My blog on Ruby http://talklikeaduck.denhaven2.com/ --~--~-~--~~~---~--~~

[Rails-core] Re: Funny behavior with Fixtures... on Ubuntu..

2008-02-13 Thread Rick DeNatale
irm... Any > help would be very much appreciated. This topic is probably better discussed on the general rails-talk forum rather than core, but One thought is to check that you are using a mysql table type which supports transactions. Innodb does, myisam (which is or used to be the default f

[Rails-core] Re: Patch to allow integration testing of file upload

2008-02-12 Thread Rick DeNatale
On 2/12/08, Rick DeNatale <[EMAIL PROTECTED]> wrote: > This allows file uploading to be tested in integration controllers. That should have said integration tests. BTW, for those using RSpec on rails, this should also allow the use of file uploads in stories. -- Rick DeNatale M

[Rails-core] Patch to allow integration testing of file upload

2008-02-12 Thread Rick DeNatale
lease have a look if interested and verify the patch, looking for +1s on the Rails Trac -- Rick DeNatale My blog on Ruby http://talklikeaduck.denhaven2.com/ --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Ruby

[Rails-core] Re: weird behavior of belongs_to referencing a model with se

2008-02-11 Thread Rick DeNatale
derstand why rails is trying to get > jos_vm_orders.order_item_id instead of jos_vm_orders.order_id, since the > primary key of orders table os order_id. > > Can somebody help. > > Tahnks, > Cláudio Caseiro > -- > Posted via http://www.ruby-forum.com/. > > > > -- Ri

[Rails-core] Re: Bug in Rails 2.0 when overloading a find_by method?

2008-01-19 Thread Rick DeNatale
On 1/19/08, Mark Wilden <[EMAIL PROTECTED]> wrote: > > From: rubyonrails-core@googlegroups.com > [mailto:[EMAIL PROTECTED] On Behalf Of Rick DeNatale > > >It has to be overwriting the definition in his subclass of AR::Base, > >otherwise he wouldn't have seen t

[Rails-core] Re: Bug in Rails 2.0 when overloading a find_by method?

2008-01-18 Thread Rick DeNatale
:Base, otherwise he wouldn't have seen the problem. -- Rick DeNatale My blog on Ruby http://talklikeaduck.denhaven2.com/ --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post

[Rails-core] Re: Bug in Rails 2.0 when overloading a find_by method?

2008-01-16 Thread Rick DeNatale
es rather than overrides). So the next time, his method is no longer there to do the parameter conversion thing. -- Rick DeNatale My blog on Ruby http://talklikeaduck.denhaven2.com/ --~--~-~--~~~---~--~~ You received this message because you are subscribed to th

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

2008-01-16 Thread Rick DeNatale
:ActiveRecord::Base < ::ActiveRecord::Base class Application::ActionView::Base < ::ActionView::Base I'm not sure what Config is, TMail::Config? -- Rick DeNatale My blog on Ruby http://talklikeaduck.denhaven2.com/ --~--~-~--~~~---~--~~ You received this messag

[Rails-core] Feedback on patch requested

2008-01-05 Thread Rick DeNatale
A minor one-line performance tweak to Array#to_xml http://dev.rubyonrails.org/ticket/10711 -- Rick DeNatale My blog on Ruby http://talklikeaduck.denhaven2.com/ --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups

[Rails-core] Re: Exception Notification plugin options hash handling????? backwards merge?

2007-11-14 Thread Rick DeNatale
What the heck! http://dev.rubyonrails.org/ticket/10168 -- Rick DeNatale My blog on Ruby http://talklikeaduck.denhaven2.com/ --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group.

[Rails-core] Re: Exception Notification plugin options hash handling????? backwards merge?

2007-11-14 Thread Rick DeNatale
On Nov 14, 2007 4:39 PM, Rick DeNatale <[EMAIL PROTECTED]> wrote: > It appears to me that he receiver and parameter of that merge message > in the argument to the body message should be reversed. > > Am I missing something here? > > Because of this I had to do som

[Rails-core] Exception Notification plugin options hash handling????? backwards merge?

2007-11-14 Thread Rick DeNatale
ug rather than something I've overlooked, should I submit a patch to the rails trac or is there somewhere else? -- Rick DeNatale My blog on Ruby http://talklikeaduck.denhaven2.com/ --~--~-~--~~~---~--~~ You received this message because you are subsc

[Rails-core] Re: Looking for comments on a rails patch, lazy association instantiation)

2007-10-28 Thread Rick DeNatale
be needed. In addition since this generates a regular inner join rather than the left outer join generated by :include, less data may be returned to be processed in cases where there are records with missing associated records. I look forward to feedback. On 10/24/07, Rick DeNatale <[EMAIL PROT

[Rails-core] Re: Looking for comments on a rails patch, lazy association instantiation

2007-10-26 Thread Rick DeNatale
oins option which if used would trigger the same kind of object identity preservation of the instances of the AR class receiving the find message. That makes sense I think. -- Rick DeNatale My blog on Ruby http://talklikeaduck.denhaven2.com/ --~--~-~--~~~---~--~~ You

[Rails-core] Re: Looking for comments on a rails patch, lazy association instantiation

2007-10-26 Thread Rick DeNatale
On 10/26/07, Josh Susser <[EMAIL PROTECTED]> wrote: > > > On Oct 24, 2007, at 3:55 PM, Rick DeNatale wrote: > > Prompted by some discussion on rails-talk last week, I worked up a > > patch to add an option to ActiveRecord::Base#find which allows > > association

[Rails-core] Re: Looking for comments on a rails patch, lazy association instantiation

2007-10-24 Thread Rick DeNatale
Sorry I intended this to go to the rails-talk list but gmail outsmarted me. On 10/24/07, Rick DeNatale <[EMAIL PROTECTED]> wrote: > Prompted by some discussion on rails-talk last week, I worked up a > patch to add an option to ActiveRecord::Base#find which allows > associations

[Rails-core] Looking for comments on a rails patch, lazy association instantiation

2007-10-24 Thread Rick DeNatale
number of association rows returned by the query, the vast majority will not be used since they are only being used to select a small set of root objects. Here's the ticket with the patch: http://dev.rubyonrails.org/ticket/9923 -- Rick DeNatale My blog on Ruby http://talklikeaduck.denhaven

[Rails-core] Re: Patch to allow Mysql adapter to properly handle non-standard key on schema dump

2007-10-24 Thread Rick DeNatale
On 10/24/07, Rick DeNatale <[EMAIL PROTECTED]> wrote: > Oops, > > It looks like the edge testing setup changed out from under me so that > the patch won't apply to edge. > > I'll update the patch once I've figured it out. I attached a new patch which fixes

[Rails-core] Re: Patch to allow Mysql adapter to properly handle non-standard key on schema dump

2007-10-24 Thread Rick DeNatale
Oops, It looks like the edge testing setup changed out from under me so that the patch won't apply to edge. I'll update the patch once I've figured it out. On 10/24/07, Rick DeNatale <[EMAIL PROTECTED]> wrote: > http://dev.rubyonrails.org/ticket/9971 > > This one

[Rails-core] Re: Rails, Class Variables and Ruby 1.9

2007-10-24 Thread Rick DeNatale
hat the rails core team thinks should be raised, the time is ripe. I'm not sure what if anything might be set in stone by rubyconf in Charlotte next week. If this is a tempest in a teapot, then feel free to ignore my concerns. -- Rick DeNatale My blog on Ruby http://talklikeaduck.denhaven2.

[Rails-core] Patch to allow Mysql adapter to properly handle non-standard key on schema dump

2007-10-24 Thread Rick DeNatale
mechanism to handle this but the mysql adapter wasn't playing the game. Please have a look at this patch and verify it. It passes both the existing mysql regression tests (i.e rake test_mysql), and the test I added to test this specific use case. -- Rick DeNatale My blog on Ruby

[Rails-core] Rails, Class Variables and Ruby 1.9

2007-10-22 Thread Rick DeNatale
e methods. I notice that Rails seems to make significant use of class variables, but I'm not sure how much it relies on their inheritablility. I figure that this is a more appropriate question to raise here than on the general rails group. Comments? -- Rick DeNatale My blog on Ruby http://ta

[Rails-core] Re: Baffling error when migration includes upper-case

2007-10-17 Thread Rick DeNatale
l? > + m.first.to_i > > (and, of course, create the IllegalMigrationNameError object) > > That way, at least, Rails will spit out an intelligible error message > instead of bombing out when it calls nil.first. Well why not submit it and see what the maintainers have to say.