February 2008
1 post
January 2008
1 post
Using Rails routes anywhere
via ara’s snippet # # this is how to use action_controller routes in a class/module other that the # rails' view and controller classes class C ActionController::Routing::Routes.install_helpers C def initialize @home_path = home_path end end — toolmantim
December 2007
6 posts
Websites can also be seen as finite-state machines that run on people....
– wrapping up 2007 (28 December 2007, Interconnected)
Which of my projects are using Git?
I forget which projects are on git and which are on svn. Here’s a one liner to find the git ones. find * -maxdepth 2 | grep "/.git$" | sed -e "s/\/.git//" Then pipe that to xargs and you can do whatever you like with the knowledge. Ahh, unix ftw.
November 2007
3 posts
Adam Keys was at RubyConf - as a poster on the wall (thx topfunky!). BUT, nonetheless, regardless, ignorant of his lack of attendance he made and awesome awesome video for us…
October 2007
2 posts
September 2007
2 posts
Testing code to the (incorrect) extreme
it "should validate_presence_of digits" do
my_model.line(7).should_read "validates_presence_of :digits"
end
- Jay Levitt (here)
August 2007
1 post
Ethan and Mark, we’re very happy with Prototype and script.aculo.us at...
– SamS @ 37signals
July 2007
21 posts
Wesabe: Firefox Uploader - awesomeness on a stick →
Packaging a rails/ruby app
Want to send a copy of your Rails app to someone? Our old friend Rake comes to the rescue.
Stick this in your Rails app’s Rakefile:
require 'rake/packagetask'
require 'rake/clean'
NAME = File.basename(File.expand_path(File.dirname(File.expand_path(__FILE__)))) unless defined? NAME
VERS = ENV['VERSION'] || begin
`svn info` =~ /Revision: (\d+)/
$1
end unless defined?...
Yesterday, … I tried to install the god gem. It asked me if I wanted to...
– Rick DeNatale on RubyGems-Dev list
Checked out revision 556526.
Holy mother of SVN revision numbers.
The title is came from running the following command:
svn co http://svn.apache.org/repos/asf/incubator/heraldry/idp/pip/trunk/ eastmedia-openid-server
svn.apache.org has a LOT of commits to its name! :)
I am also a classically trained kazoo player.
– JoeHewitt.com
Where oh where are my rails plugins? →
Congratulations. You are digitally distinct. Your online identity score is 10...
– Online Identity Calculator
I Still Call Australia Home →
Entertaining juggling… who’da thought?!
Le Tour De France starts on the 7th of July →
Day 1 is in London
Want to write a book for O'Reilly? See if you can... →
I feel sorry for the authors who got “Tick” and “Cuttlefish”
Tim Bray - Avoid Heathrow At All Costs →
Jump on the “Heathrow is awful” bandwagon in the comments.
OpenID for Wordpress →
Dr Nic Academy - sneak peak at the logo →
Firebug Lite - get Firebug on every browser, not... →
Oh my god. This could be truly awesome. Read this page and weep for all the times you’ve struggled to develop Javascript on non-Firefox browsers
June 2007
22 posts
Auto-completer for my blog comments →
Pastie paradise →
Where art thou generator? →
If you believe in telekinesis, raise my hand.
– Unknown
Has Tumblr broken syntax highlighting?
# any old sausage of code...
def sausages
%w[1 2 3].each {|n| puts "#{n} sausages"}
end
Let’s see if this is highlighted. Rumour has it Tumblr is removing element attributes on posting, which is breaking syntax highlighting…
Nope, is working fine.
If you are having problems, remember to turn off HTML Filtering under settings.
Want a new $$$ stream for your Rails consulting... →
I mocked something
I used mocha for the first time:
Post.expects(:find).with(60).returns(post)
assert_equal(post, 60.to_post, "to_activerecord not working")
Like the 60.to_post syntax? Use the to_activerecord gem.