This file contains hidden or 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
# activerecord/lib/active_record/associations/builder/belongs_to.rb automagically creates | |
# the private methods for you if you include counter_cache in your belongs_to association. | |
# We simply override the basic behavior of these with our own conditions. | |
# | |
# For more information, check out: | |
# https://github.com/rails/rails/blob/733bfa63f5d8d3b963202b6d3e9f00b4db070b91/activerecord/lib/active_record/associations/builder/belongs_to.rb | |
# Lines 23 - 44 | |
class Inventory < ActiveRecord::Base | |
belongs_to :user, counter_cache:true |
This file contains hidden or 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
" | |
" Vim Cucumber | |
" | |
" To install, put this in your .vim directory and source it. | |
" If you use Janus, place in your .vim/plugins directory and restart vim | |
function! Cuke() | |
let cmd = "cucumber --no-color %" | |
execute ":! " . cmd | |
endfunction |
NewerOlder