July 2007
AAA. →
Jul 1st
Rails Captcha Validation with Javascript. →
quickly
Jul 1st
Jorgy Porgy. →
Jul 1st
Radio marcel.
table.lfmWidget20070630220637 td {margin:0 !important;padding:0 !important;border:0 !important;}table.lfmWidget20070630220637 tr.lfmHead a:hover {background:url(http://panther1.last.fm/widgets/images/en/header/radio/my_regular_blue.png) no-repeat 0 0 !important;}table.lfmWidget20070630220637 tr.lfmEmbed object {float:left;}table.lfmWidget20070630220637 tr.lfmFoot...
Jul 1st
June 2007
Tagz.rb
A sneak peak at my upcoming tagz.rb lib. ### test/tagz.rb require ’test/unit’ STDOUT.sync = true $:.unshift ‘lib’ $:.unshift ‘../lib’ $:.unshift ‘.’ require ’tagz’ class TagzTest < Test::Unit::TestCase   include Tagz   def test_000  #—{{{     expected = ‘<foo  ></foo>’     actual = (       foo_ ...
Jun 30th
Still rendering now...
Just thought I’d summarize the vareity of responses I got regarding this post. Marcel posted on the rails list with this: From: “Marcel Molina Jr.” <marcel@NOSPAM.vernix.org> Date: June 28, 2007 10:29:56 PM MDT To: rubyonrails-talk@googlegroups.com Subject: [Rails] Re: rendering now! Reply-To: rubyonrails-talk@googlegroups.com On Thu, Jun 28, 2007 at 10:23:09PM...
Jun 30th
has_many :bugs, :through => :rails →
the name… what else can i say?
Jun 30th
Jaksche ready to talk. →
Jun 30th
Jun 29th
Render damnit!
I often times find myself wanting to write code in controllers like this: def login!   user = authenticate params[:username], params[:password]   user ? true : (( render :file => ‘access/denied’, :use_full_layout => true )) end def post_comment   login!   generate_content   render end But of course you cannot since a DoubleRender will be thrown. ...
Jun 29th
View to a bathroom. →
Jun 28th
I want one. →
Jun 27th
Jun 27th
Web 2.0 Design Zen. →
Jun 26th
Logo 2.0. →
Jun 26th
Master colour. →
Jun 25th
Jun 25th
Totally. Completely. Insane. →
Jun 25th
Practice. →
Jun 25th
Buddhist Spirituality versus Materialism - Essays... →
Jun 25th
Jun 25th
Rails, database sessions, and...
If you are using this ActiveRecord::Base::primary_key_prefix_type = :table_name_with_underscore in config/application.rb. Then the standard cfp: ~> rake db:sessions:create won’t work in rails. This is because the session migration generator doesn’t respect the configured primary key naming convention and because the column the session table uses to store the...
Jun 20th
Jun 19th
“Nonviolence means avoiding not only external physical violence but also internal...”
– Martin Luther King, Jr.
Jun 18th
Go FXXX yourself. →
Jun 18th
Metaprogramming Ruby Insight.
In all the years of Ruby I’ve done this bit of code nonetheless suprised be a little. Read carefully. class C;end module M   o = C.new   sc =     class « o       self     end   o.instance_eval do     FOO = 42     @foo = 42     def foo() FOO end   end   p C.instance_methods.grep(/foo/i)     #=> []   p C.instance_variables.grep(/foo/i)   #=> []   p...
Jun 18th
Macport Rails/Postgres tidbits. →
Jun 18th
Jun 14th
Doping reality. →
Jun 13th
Jun 12th
The World at Night From Space (Powered by Ruby). →
Jun 12th
Merb vs Rails.
I think the conventional wisdom is flat wrong. The following tests use database stored sessions to read and store the current time out. Then it simply prints that time and the string ‘42’. All tests ran in production mode. Zero modifications to configs or performance tweaking was done to any setup - they are all stock ‘out of the box’ installs on Darwin 8.9.1...
Jun 11th
Jun 9th
For Marcel.
Controller. class IndexController < ApplicationController   def index     render :text => [Employee, Boss, Company].inspect   end   def field_example_a    # take a copy of the auto-generated employee name field and configure it inline, adding a width property     @field = Employee.field(’name’).configured{ width 42 }   # fields must have there controller set in order to...
Jun 8th
http://codeforpeople.com -> svn
Many of the over 30 libraries available from http://codeforpeople.com are now available via svn at http://rubyforge.org/projects/codeforpeople/. cfp:~ > svn list svn://rubyforge.org/var/svn/codeforpeople/ alib/ arrayfields/ attributes/ branches/ dirwatch/ dmsp/ dynaload/ envi/ etc/ flow/ fsm/ lockfile/ main/ na_str/ nbfifo/ nmap/ open4/ parseargs/ pervasives/ ...
Jun 8th
Jun 8th
1 note
Strange truth. →
Jun 7th
Gem.list!
It seems like all the really cool kids are parading gems. Here are mine. cfp:~ > gem list|egrep ‘^\w’|sed ‘s/ .*$//’|sort POpen4 Platform RubyInline abstract actionmailer actionpack actionwebservice activerecord activesupport alib archive-tar-minitar arrayfields attributes autorequire cgi_multipart_eof_fix daemons ddatime dev-utils dirwatch dmsp ...
Jun 7th
Sad news about Frank. →
Jun 7th
Inflector.piss_off!
If the pluralization rules in Rails drive you nuts too, and you’ve ever written this in your code: ActiveRecord::Base::pluralize_table_names = false Then you probably actually wanted this too: Inflector.inflections.clear The first makes table names always singular. The second everything else. It’s only with both that things like associations will also work in the...
Jun 6th
Brilliant.
ATTORNEY: Doctor, before you performed the autopsy, did you check for a pulse?
WITNESS: No.
ATTORNEY: Did you check for blood pressure?
WITNESS: No.
ATTORNEY: Did you check for breathing?
WITNESS: No.
ATTORNEY: So, then it is possible that the patient was alive when you began the autopsy?
WITNESS: No.
ATTORNEY: How can you be so sure, Doctor?
WITNESS: Because his brain was sitting on my desk in a jar.
ATTORNEY: I see, but could the patient have still been alive, nevertheless?
WITNESS: Yes, it is possible that he could have been alive and practicing law.
Jun 6th
Hooters.
Doug Fales 12.00 PM: i just googled hooters
ara.t.howard 12.00 PM: get any hits?
Doug Fales 12.00 PM: no google returned 0 results.
Jun 5th
Jun 5th
Jun 4th
What makes people happy. →
Jun 2nd
Jun 2nd
Jun 2nd
Jun 1st
Jun 1st