Late again, I know, but here's my learnings from a couple weeks ago.
* If you need to use the Rails url helpers within a model or even script/console you just need these two lines:
* Alternatively within script/console you can use the "'app' or 'helper' variables to interact with the application":http://stackoverflow.com/questions/151030/how-do-i-call-controller-view-methods-from-the-console-in-rails
helper.number_to_currency('2342.33')app.get'/'
* If you want some piece of code to run after each request you can use a "'config.to_prepare' block":http://toolmantim.com/thoughts/environments_and_the_rails_initialisation_process. This might be useful if you have classes reloading in development and want to set settings after they have reloaded.
* Git can sometimes consider text files to be binary if they have Null characters at the end. You can still diff these files with this command:
git diff -a
* Super cool OS X soft phone "Telephone":http://www.pure-mac.com/downloads/telephonedl.html
* Facebook applications must be created on a Personal Account, they can not be created with a Business Account.
The rest of the development team where I work has started blogging their learnings as well. Mine are there, along with information on rendering partials from a rake task, benchmarking Rails apps with siege, OS X mail server and more. Check it out at "The Rubinauts Blog":http://blog.rubinauts.com/?p=31.
Comments
blog comments powered by Disqus