As configured in my dotfiles.
start new:
tmux
start new with session name:
| source 'https://rubygems.org' | |
| gem 'rails', '3.2.1' | |
| # Bundle edge Rails instead: | |
| # gem 'rails', :git => 'git://github.com/rails/rails.git' | |
| gem 'sqlite3' |
As configured in my dotfiles.
start new:
tmux
start new with session name:
| #Model | |
| @user.should have(1).error_on(:username) # Checks whether there is an error in username | |
| @user.errors[:username].should include("can't be blank") # check for the error message | |
| #Rendering | |
| response.should render_template(:index) | |
| #Redirecting | |
| response.should redirect_to(movies_path) |
NOTE: This post now lives (and kept up to date) on my blog: http://hakunin.com/rails3-load-paths
Do nothing. All files in this dir are eager loaded in production and lazy loaded in development by default.
| <?xml version="1.0" encoding="UTF-8"?> | |
| <!DOCTYPE template SYSTEM "../../../project-config.dtd"> | |
| <template> | |
| <name>Rails</name> | |
| <settings> | |
| <options> | |
| <option name="executionTimeoutMin" value="20" /> | |
| </options> | |
| <parameters> |
| module CapybaraSessionFactory | |
| class SessionAlreadyDefined < StandardError; end | |
| class SessionNotDefined < StandardError; end | |
| # Parse a capybara session mode, which has the form | |
| # "[driver]:[session_name]:[application_id]" | |
| # | |
| class CapybaraModeParser |
| # lib/tasks/db.rake | |
| namespace :db do | |
| desc "Dumps the database to db/APP_NAME.dump" | |
| task :dump => :environment do | |
| cmd = nil | |
| with_config do |app, host, db, user| | |
| cmd = "pg_dump --host #{host} --username #{user} --verbose --clean --no-owner --no-acl --format=c #{db} > #{Rails.root}/db/#{app}.dump" | |
| end | |
| puts cmd |
I used to use NERD tree for quite a while, then switched to CtrlP for something a little more lightweight. My setup now includes zero file browser or tree view, and instead uses native Vim fuzzy search and auto-directory switching.
There is a super sweet feature in Vim whereby you can fuzzy find your files using **/*, e.g.:
:vs **/*<partial file name><Tab>| tap "caskroom/cask" | |
| cask "google-chrome" | |
| cask "firefox" | |
| brew "chromedriver" | |
| brew "geckodriver" |