Create UML sequence diagrams on a napkin online!
I’ve wanted to be able to use an RVM version of ruby in MacVIm for a very long time now but nothing’s happened. So I decided to put together my first vim plugin.
RVM Ruby gives you a Ruby ex command that will let you all ruby from inside MacVim.
Some changes and improvements that I can foresee implementing in the near future are:
Rvm ex command that will interface with RVM directly.Take a look and feel free to hack away. I’ll happily accept contributions and/or ideas.
I recently decided it was time to refactor some messy controllers and ended up coming up with a way of quickly breaking up some of the logic in our update actions. By supplying a parameter as part of the PUT request a custom update method can be used.
That way a basic update, which probably just calls update_attributes will always be the default. But you can use custom redirects, render different partials and so on, which does come in handy when you’re doing a lot of asynchronous requests via Javascript.
Wow, that was one hell of a sentence! The module gets included in to a controller and then you PUT an update_handler as part of your request.
I added a hook to autotest this week that runs Reek after all of your tests. It’s not perfect because it can only run reek on every Ruby file in app/models, app/controllers and lib.
If you want to use it just paste the code in to your .autotest file in either your home directory or your project directory.
I’ve found myself furiously hacking ZSH completion scripts this afternoon. I wrote a pretty clean Bundler completion script a month or two ago but today managed to get `bundle exec` completion working properly as well!
The completion script is included in my dotfiles which I keep on Github.
MacVim doesn’t support RVM. Not as far as I can tell having just built it from head using Homebrew.
As you know rvm is great for keeping different versions of ruby on your system, and also is a great help with organizing your gems.
Today maybe this is of public knowledge but I have found out that macvim will use the correct gemset and ruby version if you set the ruby version and gemset before you launch macvim from the comand line.
To make this even easier I use the rvmrc files that will instruct the terminal to switch to the correct versions when entering a project.
just use
echo 'rvm use {ruby-version}@{gemset}' > /path/to/your/project/.rvmrcchange directory into your project check your ruby version and gems installed and you’ll see that you have the correct information.
Additionally rvm comes with a prompt tool that lets you know what version of ruby and gemset you’re using.
For more information on rvm check out their site
Really cool site with loads of iPhone walls… http://j.mp/cxK2TH
Dry up your use of Factories in RSpecs with a little meta programming… http://j.mp/916Gr9
My current iTunes track thanks to Bowtie, my replacement for CoverSutra.
Rails: Convert a Ruby object (typically a Hash) in to a suitable string for use as GET params… http://j.mp/cWZPCt
Rails: Using path_prefix within a route namespace removes the namespace from the URL. Unexpected but logical.