Rubick.com

Photos

Exercise motivator

Want free reminders to workout? And public shame if you don't?

New parent meal registry

Want to organize meals for after the birth of your child? Sign up for your free meal registry

Recent books read by Jade:
Implementation Patterns by Kent Beck
Beck is great.

Posted by Jade Rubick on April 17, 2008 - Permalink
Software Estimation by Steve McConnell
Another great book by Steve McConnell. I'd read his other books first, which are classics, but this is also really good.

Posted by Jade Rubick on April 17, 2008 - Permalink
Patterns of Enterprise Application Architecture by Martin Fowler
Very heavy reading, but fascinating.

Posted by Jade Rubick on April 17, 2008 - Permalink
Recent books read by Kate:
Name All the Animals : A Memoir by Smith, Alison
My dad sent me this book after he heard Smith read in Northampton, MA.  Brave memoir about the loss of her brother when she was very young, and how that event shaped the future of her family.

Posted by Kate Rubick on December 02, 2004 - Permalink
Dangerous Angels: The Weetzie Bat Books by -
I read the first book when it came out years ago on the advice of a very astute young adult librarian I know named Marin.  I picked this up in the airport in Portland on the way to NY.  I saw the title Dangerous Angels and somehow missed that it was all Weetzie Bat. Anyway, I read it all and was charmed.  Wow, who would have thought that Weetzie would ever grow up...

Posted by Kate Rubick on December 01, 2004 - Permalink
The Secret Life of Bees by Kidd, Sue Monk
A friend gave this to me early in the summer.  I don't know, I guess I get tired of the American coming of age of the abused child story.  There was some delicious imagery with the hives and some eccentric characters.  It read to me more like a YA novel than an adult one.  Which is not necessarily a bad thing, but it didn't even read like an unusually good YA novel.  I give it a B.

Posted by Kate Rubick on December 01, 2004 - Permalink
Jade's weblog
.

12:26 AM, 31 Jan 2010 by Jade Rubick Permalink | Comments (0)

I read in various places that you could use set_sequence_name is your Rails models:

class ForumsForum < ActiveRecord::Base
set_primary_key :forum_id
set_sequence_name 't_acs_object_id_seq'
...
end

However, Rails seems to completely ignore this directive for Postgres. I think it does work for Oracle, but it really does not seem to for Postgres.

Here's a unit test:

def test_save_message
forum = ForumsForum.new(:name => 'Test forum', \
:charter => 'Test charter', \
:presentation_type => 'abc', \
:posting_policy => 'abc', \
:enabled_p => 'f')
forum.save
...
end

Here's the result of the test:

1) Error:
test_save_message(ForumsMessageTest):
ActiveRecord::StatementInvalid: PGError: ERROR: null value in column "forum_id" violates not-null constraint
: INSERT INTO "forums_forums" ("name", "package_id", "last_post", "thread_count", "approved_thread_count", "max_child_sortkey", "charter", "posting_policy", "presentation_type", "enabled_p") VALUES(E'Test forum', NULL, NULL, 0, 0, NULL, E'Test charter', E'abc', E'abc', E'f') RETURNING "forum_id"
test/unit/forums_message_test.rb:20:in `test_save_message'

1 tests, 0 assertions, 0 failures, 1 errors


Note the RETURNING statement. All variations I tried to set_sequence_name did not work. After a little looking, I saw this:

http://www.ruby-forum.com/topic/81873

And looking into the Rails source code, at first glance it does appear that the sequence name is not honored.

I think my next step is going to be to set up edge rails, verify the issue, and write a patch. And I guess I may backport it as well.

If anyone knows a workaround, I'd love to hear it.

10:32 AM, 21 Dec 2009 by Jade Rubick Permalink | Comments (1)

Git interactive add [book.git-scm.com]

Interesting interactive mode for Git. The coolest thing is that you can split hunks from the same file and commit them in separate commits.

12:12 AM, 21 Dec 2009 by Jade Rubick Permalink | Comments (0)

XML