Categories
Ruby on Rails
Inject Ruby into any running OS X application
Ruby Inside
RubyInject is an intriguing new tool that can "inject" a Ruby interpreter into any running OS X application. Why? Well, along with RubyCocoa it allows you to interact with an application "from the inside
Ruby 101: Naming Conventions
Softies on Rails
UPDATE : Fixed some typos in the DialUpModem example code. Ruby enforces certain coding conventions, while others are considered to be community-accepted idiomatic Ruby. I’d like to cover them here. I
Ruby's Hidden do {} while () Loop
jvoorhis
I found the following snippet while reading the source for Tempfile#initialize in the Ruby core library: begin tmpname = File.join(tmpdir, make_tmpname(basename, n)) lock = tmpname + '.lock' n += 1 end
What's New in Edge Rails: Better Exception Handling
Ryans Scraps
It’s a common pattern to redirect the user to, or render specific pages for different types of exceptions that are thrown in your application. Prior to this changeset this usually involved overloading
Reading Excel Files From Ruby We Heart Code posts a tutorial showing how to use the Parseexcel library, a port of a Perl library that lets you parse Excel spreadsheets from your code. How To Debug Your
Ruby 201: Weird Hash Syntax
Softies on Rails
You know how I normally rave about Ruby’s clear and natural syntax, how I prefer it over languages like C#, and generally say that Ruby is better than a baked loaf of dough cut into thin vertical strips
This is a tiny update , but one worth mentioning. The various activerecord validation methods now accept an :allow_blank option that will let validation pass if the value is nil or an empty string. 1 2
validates_numericality_of just got a shot of mojo this weekend in the form of some highly useful options. Prior to this recent change, your numerical validation options were limited to only_integer and
"Rails Refactoring" by Trotter Cashion
Ruby Inside
Rails Refactoring is an e-book written by Trotter Cashion (of MotionBox ) and published by Addison-Wesley. Targeting developers who are tentatively dipping a toe into the world of REST, Rails Refactoring
Specifying Duck Types in Ruby
jvoorhis
While prototyping a RES Tful web service, I wrote the following code to allow Rails to parse a request’s parameters from a POST request containing JSON . ActionController::Base.param_parsers[Mime