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
en.versions.each{|v| print v.event; print "\n";print v.object_changes;print "---------------------------\n"} |
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
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 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 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 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 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 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 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 update | |
respond_to do |format| | |
if @enquiry.update(enquiry_params) | |
cust = @enquiry.customer | |
cust.title=params[:enquiry][:customer][:title] if params[:enquiry][:customer][:title].present? | |
cust.first_name=params[:enquiry][:customer][:first_name] if params[:enquiry][:customer][:first_name].present? | |
cust.last_name=params[:enquiry][:customer][:last_name] if params[:enquiry][:customer][:last_name].present? | |
cust.address=params[:enquiry][:customer][:address] if params[:enquiry][:customer][:address].present? | |
cust.age=params[:enquiry][:customer][:age] if params[:enquiry][:customer][:age].present? | |
cust.nationality=params[:enquiry][:customer][:nationality] if params[:enquiry][:customer][:nationality].present? |
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
- 4 | |
- 8h fixing tour's import (TOURS IMPORT) | |
- 1h (investigating missing Representatives) | |
- 5 | |
- 3h added the new search option, refactored API (add search by a boat for api) | |
- 2h (fixing empty cells in the enquiry report) | |
- 3h (add bcc to all outgoing emails) | |
- 6 | |
- 3h deploy and test some tasks with Justin, some work with payments (manage and check) | |
- 2h investigate and find a new js lib for the button (fix copy button) |
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
def extras_total | |
@extras_total ||= extras.reject(&:_destroy).sum(&:amount) | |
end |
NewerOlder