May 2007
55 posts
Validatable →
adds validation behaviour to any obj, and supports groups (valid_for_registration? valid_for_administrator?), levels and validation inheritance… all the things i’ve felt missing from AR::Base at various times
May 29th
May 28th
May 27th
“Supporting the demonstration were Austrian, German and Italian MPs, Richard...”
– Right Said Fred, of “I’m too sexy” fame, speaks out against the appalling bashing of Russian gay rights activitists
May 27th
darkroom.rb →
using ruby/cocoa to do fullsize screenshots of a web page
May 27th
1 note
Debuggin routes
ActionController::Routing::Routes.named_routes.sort_by {|n,_| n.to_s}.each do |n, r| puts "#{n}:" puts r puts end edit_event: GET /events/:id/edit/ {:action=>"edit", :controller=>"events"} edit_session: GET /session/edit/ {:action=>"edit", :controller=>"sessions"} event: GET /events/:id/ ...
May 27th
“I wish to make a documentary about the invisible radioactive monkeys at the...”
– Bad Science on BBC’s FUD-slinging wi-fi “documentary”
May 24th
1 note
bunch of interestin plugins →
from the adocca guys
May 22nd
the secret to memcached →
and other memcached related goodies sprinkled throughout the discussion
May 22nd
and if you don't get the last image.... →
May 22nd
May 22nd
“I was the nerd on the beach with the really big ball… and the T1...”
– Gierow and his big ball of connectivity
May 22nd
“It seems to me that Rails is better suited as a back-end grungy file...”
– SydneyStephen, rails-core
May 21st
“Ruby is a fine language for most tasks, but rails is I think widely accepted...”
– demigod speaks
May 20th
components 2.0 →
bad Ara, bad!
May 18th
to_s(:shortish)
Time::DATE_FORMATS[:shortish] = Date::DATE_FORMATS[:shortish] = "%d %b %y" Time.now.to_s(:shortish) #=> "18 May 07"
May 17th
May 17th
1 note
“now i’m learning the Beast source code, but a problem happened when read...”
– uh oh! it’s those framework coders, and they’ve invaded rubyonrails-deployment
May 16th
May 16th
“Another problem is that it [mod_proxy_balancer] has no idea that downstream...”
– Alexey Verkhovsky (thoughtworks) on rubyonrails-talk
May 16th
patchin plugins as-ya-go with piston
$ cd someapp/vendor/plugins/accessible_form_builder $ svn diff | patch -p0 -d ~/Sites/rails-oceania/timlucas/plugins/accessible_form_builder $ svn ci ~/Sites/rails-oceania/timlucas/plugins/accessible_form_builder -m "Fixed some boog" $ svn up $ piston up $ svn ci -m "Updated to the latest ver. of the plugin (to fix some boog)"
May 16th
Raaum's Rails Readers →
for a bunch of other useful docs too
May 16th
Raaum's ActiveRecord Rails Reader →
for a comprehensive reference doc on everything that is ActiveRecord
May 16th
tiny midget model
# DB-based payment sequence generator class PaymentSequence < ActiveRecord::Base def self.generate create.id.to_s end end
May 16th
+@?
somevar =+ "+@... wtf?" #=> NoMethodError: undefined method `+@' for "+@... wtf?":String of course, cause… +"+@... wtf?" #=> NoMethodError: undefined method `+@' for "+@... wtf?":String (thanks lachie)
May 15th
override'n association magic
seeing as the last one caused so much fun: class LineItem < ActiveRecord::Base belongs_to :offer belongs_to :tax def tax_with_defaulting_to_offer tax_without_defaulting_to_offer || offer.tax end alias_method_chain :tax, :defaulting_to_offer end
May 14th
“We don’t confirm bowel movements, we just do them. Doodie. Root word: do....”
– unspace on facebook’s act-first ajax
May 13th
1 note
“I/O events exist in real time, and provide the coordination between real-time...”
– the mindfuck that is Croquet
May 12th
acts_as_solr →
for adding a search engine to your Rails app… now with a delicious screencast showing how dang easy it is to get up and running.
May 12th
May 12th
May 11th
funky business cards →
May 10th
“Reading the paper is like watching the minute hand to tell the time”
– rupert, the up-coming JF philosophical poet
May 10th
“Java - $1”
– New - Pastie
May 10th
“Massive improvements to Spec::Ui… Inline screenshots and HTML [for failing...”
– RSpec 0.9.4 changelog
May 9th
“1. Inability to put forth the effort required to complete any task.”
– the 10 Attributes of Really Lazy People
May 9th
overide'n dynamic finders
class User < ActiveRecord::Base def self.find_by_email(email, *opts) with_scope(:find => { :conditions => ['lower(email) = lower(?)', email] }) do find(:first, *opts) end end end update: this seems to have caused quite the stir. Obviously some people are missing the point, so I’ve posted a wee article about it.
May 9th
“I wasn’t kidding when I said Microsoft took email design back 5 years.”
– Dave Greiner, CSS support in email: 2007 edition
May 9th
“Everyone is trying to accomplish something big, not realizing that life is made...”
– Frank A. Clark
May 6th
1 note
“Documentation is like sex: when it is good, it is very, very good; and when it...”
– Dick Brandon, via robbyrussell
May 6th
3 notes
May 6th
May 6th
May 6th
NetworkFacade
class Netvibes < NetworkFacade::REST::Client 'http://www.netvibes.com' end n = Netvibes.new(:mapping => { :login => '/user/signIn.php', :load => '/get/userData.php', :save => '/save/userData.php' }, :post => [:login, :save]) p n.login(:email => EMAIL, :password => PASSWORD) p n.load Sexier than DRb?
May 3rd
Silly season →
nothing like a good rant
May 3rd
QOOB →
for funky designerish videos. New fav video site
May 3rd
3d flex UI →
from those dang-smart outsmart guys
May 3rd
“All cats want to rule the world, that’s part of the nature of the species,...”
– catsthatlooklikehitler.com
May 2nd
“Nothing says party like a hat made of meat”
– hams@hatsofmeat.com
May 2nd
“One always looks neat, in a hat made from meat.”
– Mark Twain, on hatsofmeat.com
May 2nd