- loading...
map_by_method – the final announcement
I don’t really talk about my projects after I release them except to show off fancy new things, like newgem sporting the new RubiGen generator.
So I don’t know why I give updates here about one of the smallest projects – map_by_method.
Probably, its because it doesn’t deserve a Google Group or even a webpage really. It should probably be integrated into activesupport gem or something.
Except, it just never seemed to 100% work.
That is, it go more blog coverage than anything else, but wasn’t always useful. Yeah, a like Miss South Carolina.
BUT Version 0.8.2 is now out. It fixes – I believe – all known problems – I think.
gem install map_by_method
In your code (or config/environment.rb for rails):
gem 'map_by_method', '>=0.8.2' require 'map_by_method'
I added a few more iterator methods too: sort_by, group_by, and index_by.
>> Conference.find(1).conference_sessions.group_by_from => returns all MyConfPlan conference sessions grouped by start time, for RailsConf2007
MyConfPlan…
Oh yes it sold. Announcement coming soon.
Plus, a link to the code – as it is being open sourced by its new owner. Sweet!
Well… sweet for you. I already had access to the code.
Next on the todo list
Add something similar to Ambition by Err “we-write-so-many-cool-projects-I-don’t-know-how-we-find-time-to-maintain-them-all” the Blog, Chris and PJ.
I’d kind link something like:
Conference.select { |c| c =~ "Rails").sort_by_name
Which would behave like:
>> Conference.select {|c| c.name =~ /Rails/}.sort_by(&:name).to_sql
=> "SELECT * FROM conferences WHERE conferences.\"name\" ~ 'Rails' ORDER BY conferences.name"
Oh well, perhaps we can talk about it during RailsConf Europe, when I get the microphone to talk about such tom-foolery and hi-jinx: Meta-Magic in Rails: Become a Master Magician