This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class TweetsController < ApplicationController | |
def update | |
tweet = Tweet.find(tweet_params[:id]) | |
if tweet.editable_by?(current_user) | |
tweet.update!(body: tweet_params[:body]) | |
end | |
end | |
private |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"app/assets/javascripts/router.js": { | |
"command": "jini" | |
}, | |
"app/controllers/api/v1/*_controller.rb": { | |
"command": "apicontroller", | |
"alternate": "spec/controllers/api/v1/%s_controller_spec.rb", | |
"template": "class Api::V1::%SController < ApplicationController\n respond_to :json\nend" | |
}, | |
"app/assets/javascripts/models/*.js": { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@import url(http://fonts.googleapis.com/css?family=Roboto:400,700,300,400italic); | |
@import url(http://fonts.googleapis.com/css?family=Maven+Pro:400,500,700); | |
ul, ol { | |
list-style: none; | |
} | |
h1, h2, h3, h4, h5, h6, pre, code { | |
font-size: 1em; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ~/hashrocket/hr/share/mux-init | |
tmux \ | |
split-window -h -t $name \; \ | |
split-window -d -h -t $name \; \ | |
select-layout -t $name main-horizontal &>/dev/null \; \ | |
new-window -a -d -n server -t $name:0 \; \ | |
split-window -d -h -t $name:server \; \ | |
send-keys -t $name:0.2 'vim .' C-m \; \ | |
send-keys -t $name:1.1 'rails s' C-m \; \ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Detect the Vimium Chrome extension by Evan Hahn (evanhahn.com) | |
;(function(doc) { | |
doc.hasVimium = function() { | |
return doc.getElementsByClassName('vimiumReset').length > 0; | |
}; | |
doc.onDetectVimium = function(callback, scope) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"app/assets/javascripts/router.js.coffee": { | |
"command": "jini" | |
}, | |
"app/controllers/api/v1/*_controller.rb": { | |
"command": "apicontroller", | |
"alternate": "spec/controllers/api/v1/%s_controller_spec.rb", | |
"template": "class Api::V1::%SController < ApplicationController\n respond_to :json\nend" | |
}, | |
"app/assets/javascripts/models/*.js.coffee": { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set shiftwidth=2 | |
set number | |
colorscheme molokai | |
set ignorecase | |
if version >= 700 | |
au InsertEnter * hi StatusLine ctermfg=28 ctermbg=white |