Last active
October 18, 2016 13:20
-
-
Save filipebarcos/fae34d3d1339eb10e61d42abcf6f7ad3 to your computer and use it in GitHub Desktop.
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
client_name = '' | |
if @invoice.client_company_name.present? | |
client_name = @invoice.client_company_name.gsub(' ', ' ').gsub(/[^0-9A-z\-]/, '_').gsub('__', '_') | |
elsif @invoice.client_name.present? | |
client_name = @invoice.client_name.gsub(' ', ' ').gsub(/[^0-9A-z\-]/, '_').gsub('__', '_') | |
elsif @invoice.client_email.present? | |
client_name = @invoice.client_email.gsub(' ', ' ').gsub(/[^0-9A-z@.\-]/, '_').gsub('__', '_') | |
end | |
contractor_name = @invoice.contractor_name.gsub(' ', ' ').gsub(/[^0-9A-z\-]/, '_').gsub('__', '_') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment