-
Nesting resource routes with alternate scopes and keys + strong parameters.
DISCLAIMER: This is a contrived example translated from a case where it actually made way more sense to break the familiar nested resource pattern. Also, I haven’t double-checked how Rails’ pluralization rules would affect the naming of any given Species. Say you have a pair of models: class Species # id # latin_name_with_underscores end class…
-
Git wrapper for vim: fugitive.vim
Today’s browsing through “plugins that I haven’t made good enough use of” brings me to vim-fugitive: :Gstatus pulls git status output into a vim split window. Pressing – on the line that a file is listed on either adds or removes a file from staging, and :Gcommit commits it. :Gdiff opens a vertical split next…
-
Using vim-rails to help navigate the rails project.
In the interest of being able to quickly navigate my Rails projects, I decided to dive a little deeper into the vim-rails plugin. This helpfile describes the commands in detail, but some of the quick commands are :Econtroller, :Emodel, :Eview, which pretty reliably jump between corresponding controller, model, and view. :Espec needs a little more…
