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
# TODO - add dependent option support | |
def delete_records(records) | |
klass = @reflection.through_reflection.klass | |
records.each do |associate| | |
klass.delete_all(construct_join_attributes(associate)) | |
end | |
end |
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
" ============================================================================ | |
" Netrw Directory Listing (netrw v135) | |
" /Users/reinh/.vim/bundle | |
" Sorted by name | |
" Sort sequence: [\/]$,\<core\%(\.\d\+\)\=\>,\.h$,\.c$,\.cpp$,*,\.o$,\.obj$,\.info$,\.swp$,\.bak$,\~$ | |
" Quick Help: <F1>:help -:go up dir D:delete R:rename s:sort-by x:exec | |
" ============================================================================ | |
../ | |
gist-vim/ | |
vim-fugitive/ |
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
"============================================================================= | |
" File: gist.vim | |
" Author: Yasuhiro Matsumoto <[email protected]> | |
" Last Change: 26-Oct-2009. | |
" Version: 3.0 | |
" WebPage: http://github.com/mattn/gist-vim/tree/master | |
" Usage: | |
" | |
" :Gist | |
" post whole text to gist. |
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
"============================================================================= | |
" File: gist.vim | |
" Author: Yasuhiro Matsumoto <[email protected]> | |
" Last Change: 26-Oct-2009. | |
" Version: 3.0 | |
" WebPage: http://github.com/mattn/gist-vim/tree/master | |
" Usage: | |
" | |
" :Gist | |
" post whole text to gist. |
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
# TODO - add dependent option support | |
def delete_records(records) | |
klass = @reflection.through_reflection.klass | |
records.each do |associate| | |
klass.delete_all(construct_join_attributes(associate)) | |
end | |
end |
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 ActiveRecord::Associations::HasManyThroughAssociation | |
private | |
def delete_records(records) | |
klass = @reflection.through_reflection.klass | |
method_map = {:destroy => :destroy_all} | |
method_name = method_map.fetch(@reflection.options[:dependent], :delete_all) | |
delete_method = klass.method(method_name) | |
records.each do |associate| | |
delete_method.call(construct_join_attributes(associate)) |
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
uudec(Text) -> << <<(X-32):6>> || <<X:8>> <= Text >>. | |
ydec (<<$=, X, Rest/binary>>) -> <<(X-106 rem 256):8, (ydec(Rest))/binary>>; | |
ydec (<<X, Rest/binary>>) -> <<(X-42 rem 256):8, (ydec(Rest))/binary>>; | |
ydec (<<>>) -> <<>>. |
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
FileElement = lists:last(xmerl_xpath:string("//file", Xml)), | |
{file, Attributes, _} = xmerl_lib:simplify_element(FileElement), |
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
FileElement = lists:last(xmerl_xpath:string("//file", Xml)), | |
{file, Attributes, _} = xmerl_lib:simplify_element(FileElement), | |
Subject = proplists:get_value(subject, Attributes), |