Rails Core Weekly May 29 - June 4

Dear List,

Another week has passed, here's RCW, the McCartney Edition:

This weeks kicks of with Josh Susser fixing has_and_belongs_to_many
#create method to properly populate joins with new records
:http://www.ruby-forum.com/topic/67478#new. Check out his test:


def test_create_by_new_record
  devel = Developer.new(:name => "Marcel", :salary => 75000)
  proj1 = devel.projects.create(:name => "Make bed")
  proj2 = devel.projects.create(:name => "Lie in it")
  assert_equal devel.projects.last, proj2
  assert proj2.new_record?
  devel.save
  assert !devel.new_record?
  assert !proj2.new_record?
  assert_equal devel.projects.last, proj2
  assert_equal Developer.find_by_name("Marcel").projects.last, proj2
# prove join table is updated
end


[ thread: http://www.ruby-forum.com/topic/67478#new ]

Tom Ward and possible others are confused about as to what :limit
really means when used for integer columns in migrations:

1. the number of bytes ( as patch #4335:
http://dev.rubyonrails.org/changeset/4335  would suggest ) or
2. the window or field/display with as the mysql adapter will make you think.

There's an unapplied patch #4353 that can put an end to the suspense.
Tom Ward is still waiting for the list to respond.

[ thread: http://dev.rubyonrails.org/changeset/4379 ]

Some days ago choonkeat alerted the list that patch #5216 actually
makes habtm resilient against the existence of extra attributes
messing up the normal ops of habtm. However habtm is reaching the end
of its product lifecycle (i.e. don't use it anymore, use has_many
:through, affectionately known as hmt) and this patch might not be
needed anymore. But Rick Olson thnks this patch might in fact help
people migrate ot hmt. choonkeat still feels hte patch should be
applied to make habtm behave correctly in spite of an extra column
being present. The jury is still out on this one.

[ thread: http://www.ruby-forum.com/topic/67534#new ]

May 31, 206 will be remembered by many. On this day Jamis Buck and
Nick Seckar announced a complete rewrite of the Rails Routing module.
The Routing internal have changed significantly. Jamis and Nick
promise that the new code is leaner, faster, easier to understand and
best of all easier to extend. Just after Jamis give the list a heads
up , feature requests come poring in. A discussion about the
caching/sweepers behavior and routes ensues.

On June 3 the code is checked in a lots of Railers start testing. Some
things break, some thing don't. What stand out most is that :id seems
to have a sticky bit set as noticed by Hampton. Jamis replies:


"...we'll see what can be done with this, since it
should definitely not be acting so zealous."

Rick Olson tries out the routing code on Simply Restful and seems to
be getting a lot of errors. He wrote the most useful thingy to help
people test their routes: http://rpaste.com/pastes/198 Dump that in
view directory and just run it (generate a controller for it but don't
add any methods to it). Apart from being mightily useful it also
teaches the casual reader about the new routing code. Thanks Rick ,
great stuff.

Last notes regarding the module is from Julian Tarkhanov who would
like to see the ambiguity regarding a leading slash disappear with the
new routing module.

We've might have missed it but fortunately we didn't : Blair Zajac
makes to_xml faster: http://dev.rubyonrails.org/ticket/4989. His post
rather fantastically ( and I mean that in most positive way) explains
the new benefits ( eg the :include option can now go arbitrarily deep
and that's just awesome). There are still some issues and Blair needs
your feedback. Please provide copiously.

[thread: http://www.ruby-forum.com/topic/67947#new ]

Greg Lappen submitted a patch: http://dev.rubyonrails.org/ticket/5215
and like a couple of other people would like to know when his patch
will be reviewed or committed. His patch is rather useful ( add_column
on sqlite3 db's with existing data fail when new columns has :null =>
'false') He has a hunch that other db's will break as well with this
scenario.

[ thread: http://www.ruby-forum.com/topic/67534#new ]

Greg's not the only one wondering about the whole ticket submission,
reviewing, commit process. Some time earlier Manfred enquires about
the Process. The Process turns out is simply:

"There's no formal procedure per se. The ticket has to be tested,
follow style conventions, be backwards compatible, and hopefully
something that has meaning for most people most of the time. But all
of these rules go out the window some times, if there's a stroke of
genius found in the submission." (DHH)

Josh then wonders about the use of Trac and Marcel sheds some light on
his use of the reports.

[thread: http://www.ruby-forum.com/topic/68051#new ]

Just when you think the list couldn't possible handle more this week
Hampton starts a discussion about plugins. no replies have been given
yet so we'll save this for next weeks RCW.

[thread: http://www.ruby-forum.com/topic/68059#new ]

As a result of the routing code update things seems to break on
Windows as well 'unexpectedly'. Mislav Marohnic has done a great job
on making things better on windows with 3 patches that make things
better ( #5278: http://dev.rubyonrails.org/ticket/5278, #5276:
http://dev.rubyonrails.org/ticket/5276 , #5285:
http://dev.rubyonrails.org/ticket/5285 ) Even though this is great
work he feels his solutions might be suboptimal and in the spirit of
Rails asks for advise. None has been given yet, but it's sure to come.

[ thread: http://www.ruby-forum.com/topic/67958#new ]

Another major discussion is started this time by Kevin Clark regarding
the recent flooding of Trac with Scriptalicous tickets. Several
solutions are proposed, no decision has been taken yet.

[thread: http://www.ruby-forum.com/topic/67869#new ]

Finally Thibaut Barrère feels the water regarding implementing a
Continuous Integration cycle for Rails. Though the bottom line is CI
is not a good fit for the Rails core code (think of all the plugins
that intentionally break Rails standard behavior) it might be fitting
for plugin developers. There are users like Isaac Reuben and Benjamin
Curtis who are interested in setting this up. There's a good change
this discussion will move to the Rails Users list soon.

And before we forget implementing a full scale real bind variables
solution gets the nod of approval from DHH.

That concludes this weeks RCW, a big one. I'll try to keep it shorter
next time :-)

RSS feed for RCW:
http://www.pinupgeek.com/articles/category/rails-core-weekly-news

--
Rodney
http://www.pinupgeek.com
http://www.dutchrailers.org
_______________________________________________
Rails-core mailing list
Rails-core@lists.rubyonrails.org
http://lists.rubyonrails.org/mailman/listinfo/rails-core

Reply via email to