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
| cancellation_fees_params.map do |c_f_params| | |
| fee = CancellationFee.find_or_initialize_by(cancellable_id: c_f_params[:cancellable_id], | |
| cancellable_type: c_f_params[:cancellable_type]) | |
| fee.assign_attributes(c_f_params) | |
| fee.save | |
| fee | |
| end |
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
| function recusion(token, folder) { // не id а саму папку, чтобы можно был один интерфейс | |
| subfolders = []; | |
| var folders = getSubfolders(token, folder.id) | |
| for (var i = 0; i < folders.items.length; i++) { | |
| subfolders.push(recusion(token, folders[i])); | |
| } | |
| folder['subfolders'] = subfolders; | |
| return folder | |
| } |
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
| def self.enquiry_created(enquiry) | |
| tries ||= 3 | |
| params = default_params(enquiry).merge(enq: 1, pax: 1) | |
| Pusher.trigger('enquiry_report', 'data_updated', params) | |
| rescue Pusher::HTTPError, HTTPClient::ConnectTimeoutError => e | |
| retry if (tries -= 1) > 0 | |
| end |
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
| { | |
| // Place your snippets for javascript here. Each snippet is defined under a snippet name and has a prefix, body and | |
| // description. The prefix is what is used to trigger the snippet and the body will be expanded and inserted. Possible variables are: | |
| // $1, $2 for tab stops, $0 for the final cursor position, and ${1:label}, ${2:another} for placeholders. Placeholders with the | |
| // same ids are connected. | |
| "Redux Axios action": { | |
| "description": "Create axios action", | |
| "prefix": "axios_action", | |
| "body": [ |
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
| git ls-files -ci —exclude-standard -z | xargs -0 git rm —cached |
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
| pg_dump --encoding=utf8 --no-owner --username username --format plain --verbose --table public.table_name db_name --file "filename" | |
| psql --username=username db_name -f filename | |
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
| en.versions.each{|v| print v.event; print "\n";print v.object_changes;print "---------------------------\n"} |
OlderNewer