With the recent release of Rails 3.0 Release Candidate 2, DHH posted on the official Rails blog to check out the sweet GitHub compare view between the two RCs for detailed information. This list is by no means complete but I made some notes from the commit view, with links where possible, about the bigger [...]
Rails Reminder: DATE_FORMATS
by Jason on 10. Mar, 2010 in Ruby
A friend of mine recently asked me about adding time formats to Rails apps. It’s not completely intuitive on how to add new "default" symbols for date and time formats or to get a list of the built in ones. The API has the built-in lists of constants under DATE_FORMATS but it’s a bit difficult [...]
Using the Rails logger outside of models and controllers
by Jason on 10. Aug, 2009 in Ruby
You can use the Rails logger outside of Rails models in at least version 2.3.X and up of Rails. You might be used to doing the following in your models or controllers: logger.info "Some debugging info I want to see in my development log." If you make a regular model that doesn’t inherit from ActiveRecord, [...]
Getting RSpec and TextMate to play nice
by Jason on 05. Aug, 2009 in Ruby
Elijah Miller has a great blog post on getting TextMate and RSpec to play nicely together. This is pretty useful for just running specific spec files. Also, did you know you can get TextMate to automatically recognize spec files by naming them with the .spec extension and RSpec will recognize it? Link Delicious Digg This [...]
Receiving Email with Rails
by Jason on 24. Apr, 2009 in Ruby
This article originally appeared in the first issue of Rails Magazine. It is reproduced here not quite verbatim with a couple of corrections and additions. Photo from esparta on Flickr. Introduction Receiving email is a great way to add functionality to your application. This is one area, though, that is not very well documented with [...]
Rails metal call order
by Jason on 08. Apr, 2009 in Ruby
I was really mystified today trying to figure out how to bump up the response in Rails metal. The default metal generator generates something that looks like the following: I had mistakenly changed it to 500 and didn’t realize why the app completely broke. It turns out that Rails itself uses a 404 code in [...]
Turning Off Webrat’s Automatic Browser Opening
by Jason on 18. Feb, 2009 in Ruby
If you’re using webrat for doing your integration testing with Rails and you’re on OS X you may notice that webrat opens an html version of the failing test every time you run it. This can be fairly annoying if you’re running autotest. I didn’t see how to turn it off in the documentation but [...]
About




