Oracle patches for Rails
The code I described and provided earlier in my entry: Rails, db_structure_dump, and Oracle was submitted as a patch to Rails around the time of the 0.13.0 release. I just received an email today closing the ticket, showing that the patch was closed in favor of ticket #1798. Curious, I poked around looking at ticket 1798. It includes a number or oracle related patches for Rails, including my implementation of structure_dump.
The patches will give the Oracle adapter a number of improvements. Improvements related to the structure_dump implementation are the implementation of purging and cloning Oracle databases. Some bigger changes include the ability to use synonyms and a change which could break existing users: Using sequences on a per-table basis. Previously, Rails used a single sequence to generate the primary keys for all tables. The next release will change the behavior to create and use sequences in the form “#{table_name}_seq” which is more common practice.
The current stance is that existing Oracle users who want to retain the single, global sequence will have to modify their environment.rb (after the next Rails release) to include:
ActiveRecord::Base.set_sequence_name = "rails_sequence" Update: As of Rails 1.0 RC3, the way to set the sequence name for all ActiveRecord's has changed from the initial proposal. Now, you'd do something like so:
# Post 0.13.1, Force the OCI Adapter to use the global sequence like it used to
class ActiveRecord::Base
set_sequence_name "rails_sequence"
end Exciting Typo patches in the works
Scott Laird is doing some exciting work on patching up new features for Typo. I’m especially interested in the new sidebar plugin work he’s doing.
He’s been making it simpler to package up sidebar plugins for Typo – such as the available Flickr, Tadalist, or delicious integration. The current stable release of Typo hard-codes these into the main layout template and sticks the helper code inside Typo. He’s making it easier to just drop a plugin package in and, under the admin inetrface, drag and drop them into your sidebar. This way you can enable or disable them via WYSIWYG rather than hacking the rhtml.
Editing the rhtml to enable plugins really isn’t a big deal for techy geeks who grok Rails and HTML. But for bloggers who just want to post articles and skin a website – they won’t really want to be editing templates and copying and pasting code into controllers and helpers.