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
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
darkroom.rb →
using ruby/cocoa to do fullsize screenshots of a web page
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/ ...
I wish to make a documentary about the invisible radioactive monkeys at the...
– Bad Science on BBC’s FUD-slinging wi-fi “documentary”
bunch of interestin plugins →
from the adocca guys
the secret to memcached →
and other memcached related goodies sprinkled throughout the discussion
and if you don't get the last image.... →
I was the nerd on the beach with the really big ball… and the T1...
– Gierow and his big ball of connectivity
It seems to me that Rails is better suited
as a back-end grungy file...
– SydneyStephen, rails-core
Ruby is a fine language for most tasks, but rails is I think widely accepted...
– demigod speaks
components 2.0 →
bad Ara, bad!
to_s(:shortish)
Time::DATE_FORMATS[:shortish] = Date::DATE_FORMATS[:shortish] = "%d %b %y"
Time.now.to_s(:shortish) #=> "18 May 07"
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
Another problem is that it [mod_proxy_balancer] has no idea that downstream...
– Alexey Verkhovsky (thoughtworks) on rubyonrails-talk
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)"
Raaum's Rails Readers →
for a bunch of other useful docs too
Raaum's ActiveRecord Rails Reader →
for a comprehensive reference doc on everything that is ActiveRecord
tiny midget model
# DB-based payment sequence generator
class PaymentSequence < ActiveRecord::Base
def self.generate
create.id.to_s
end
end
+@?
somevar =+ "+@... wtf?"
#=> NoMethodError: undefined method `+@' for "+@... wtf?":String
of course, cause…
+"+@... wtf?"
#=> NoMethodError: undefined method `+@' for "+@... wtf?":String
(thanks lachie)
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
We don’t confirm bowel movements, we just do them. Doodie. Root word: do....
– unspace on facebook’s act-first ajax
I/O events exist in real time, and provide the coordination between real-time...
– the mindfuck that is Croquet
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.
funky business cards →
Reading the paper is like watching the minute hand to tell the time
– rupert, the up-coming JF philosophical poet
Java - $1
– New - Pastie
Massive improvements to Spec::Ui… Inline screenshots and HTML [for failing...
– RSpec 0.9.4 changelog
1. Inability to put forth the effort required to complete any task.
– the 10 Attributes of Really Lazy People
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.
I wasn’t kidding when I said Microsoft took email design back 5 years.
– Dave Greiner, CSS support in email: 2007 edition
Everyone is trying to accomplish something big, not realizing that life is made...
– Frank A. Clark
Documentation is like sex: when it is good, it is very, very good; and when it...
– Dick Brandon, via robbyrussell
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?
Silly season →
nothing like a good rant
QOOB →
for funky designerish videos. New fav video site
3d flex UI →
from those dang-smart outsmart guys
All cats want to rule the world, that’s part of the nature of the species,...
– catsthatlooklikehitler.com
Nothing says party like a hat made of meat
– hams@hatsofmeat.com
One always looks neat, in a hat made from meat.
– Mark Twain, on hatsofmeat.com