Tidbit from RailsCast 132:
ActionController::Base.helpers is a proxy object you can use to access Rails view helpers, outside of views, e.g.:
1
ActionController::Base.helpers.pulralize(products.count, ‘product’)
|
|||||
|
Tidbit from RailsCast 132: 1 Railscast 20 reminded me that helper_method :name makes controller method name available in views. As described here, Command-Shift-4 will capture a dragged area of the screen and save it to a file. I keep forgetting where this is, and I can’t find it in google right now, so lets blog it: The builtin Screen Sharing tool in Mac OS X Leopard is at: /System/Library/CoreServices/Screen Sharing.app Just run it and it will prompt you for a server to connect to. From the command line use open -a with the [...] Just found out how to test named routes in the Rails console here: script/console The mysterious app object is described here. sudo port selfupdate |
|||||
|
Copyright © 2010 Sam Pierson's Blog - All Rights Reserved |
|||||