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
date_range = Date.new(2013,1,1)..Date.today | |
booked_itineraries = Itinerary.valid.visible.where(created_at: date_range).where.not(booking_confirmation: nil) | |
# Include module parcelable on ActiveRecord::Relation | |
data = booked_itineraries.parcel_by(date_range, :weekly) {|s,d| [s,d.count]} |
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
.form-group | |
%label.col-xs-2.control-label Roles | |
.col-xs-10 | |
.form-inline | |
.panel.roles-wrapper.panel-default | |
.row.panel-body | |
.col-sm-12 | |
%span.roles-container | |
.btn.add-role | |
%span.text-muted add role |
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
NAME_PARTS = { | |
stems: ["Name", "Bloop", "Fake", "Spoof", "Glorp", "Madeup", "Foob", "Silly", | |
"Snoop", "Bob", "Winkle", "Snarf", "Zapp", "Dogg", "Sneeez", "Beard"], | |
first_suffixes: ["y", "er", "o", ""], | |
last_name_prefixes: ["Mc", "Mac", "Van", "Von", "De", "Da", "O'", "", ""], | |
last_name_second_suffixes: ["pants", "face", "son", "ford", "noggin", "beard", "name", "dogg", "head"], | |
} | |
def fake_name_cleanup(str) | |
str.gsub('ee','e') |