Setting up Ruby on Rails for OSX (10.10) YosemiteMarch 20, 2015
Very little has changed since Mavericks but here's an updated tutorial.
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" brew doctor brew update
brew install rbenv ruby-build openssl
Fixing MacVim Fullscreen in YosemiteMarch 17, 2015
Many long term users of Macvim like myself have been annoyed that fullscreen mode cuts off the first couple lines and shows a bar on the right when using OSX Yosemite. After trying out multiple forks that kind of fixed it but also introduced other problems I finally found a satisfactory fix. Just run this in the terminal to turn off yosemites fullscreen method on macvim.
$ defaults write org.vim.MacVim MMNativeFullScreen 0
Saving dynamic serialized fields with fields_for in RailsFebruary 23, 2015
Tell you model to serialize it as a struct and create a setter to build the struct on create.
# post.rb model serialize :content, OpenStruct def content=(v) self[:content] = OpenStruct.new(v) end
Then you can add any form elements you want for content.
-#form partial = f.fields_for :content, @post.content do |ff| .field = ff.label :name = ff.text_field :name .field
Petergate AuthorizationsJanuary 18, 2015
"If you like the straight forward and effective nature of Strong Parameters and suspect that cancan might be overkill for your project then you'll love Petergate's easy to use and read action and content based authorizations."
-- I proclaim optimistically
My vimrcNovember 12, 2012
" " ======================================================================== " " Isaac Sloan - Vim Configuration 2012 " " ======================================================================== set rtp+=~/.vim/bundle/vundle/ call vundle#rc() Bundle 'gmarik/vundle' " My bundles Bundle 'ervandew/supertab' Bundle 'tpope/vim-fugitive' Bundle 'tpope/vim-rails' Bundle 'tpope/vim-haml' Bundle 'slim-template/vim-slim'