diff --git a/app/controllers/customers_controller.rb b/app/controllers/customers_controller.rb index 9d08e4d..66c0253 100644 --- a/app/controllers/customers_controller.rb +++ b/app/controllers/customers_controller.rb @@ -1,6 +1,6 @@ #The MIT License (MIT) # -#Copyright (c) 2022 rick barrette +#Copyright (c) 2024 rick barrette # #Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: # @@ -10,7 +10,6 @@ # This controller class will handle map management class CustomersController < ApplicationController - unloadable include AuthHelper helper :issues diff --git a/app/controllers/estimate_controller.rb b/app/controllers/estimate_controller.rb index f7ffbfa..437d5b7 100644 --- a/app/controllers/estimate_controller.rb +++ b/app/controllers/estimate_controller.rb @@ -1,6 +1,6 @@ #The MIT License (MIT) # -#Copyright (c) 2022 rick barrette +#Copyright (c) 2024 rick barrette # #Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: # @@ -8,7 +8,6 @@ # #THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. class EstimateController < ApplicationController - unloadable include AuthHelper diff --git a/app/controllers/invoice_controller.rb b/app/controllers/invoice_controller.rb index 0f4017a..c193fcd 100644 --- a/app/controllers/invoice_controller.rb +++ b/app/controllers/invoice_controller.rb @@ -1,6 +1,6 @@ #The MIT License (MIT) # -#Copyright (c) 2023 rick barrette +#Copyright (c) 2024 rick barrette # #Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: # @@ -8,7 +8,6 @@ # #THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. class InvoiceController < ApplicationController - unloadable include AuthHelper diff --git a/app/controllers/qbo_controller.rb b/app/controllers/qbo_controller.rb index c43193b..7ef9703 100644 --- a/app/controllers/qbo_controller.rb +++ b/app/controllers/qbo_controller.rb @@ -1,6 +1,6 @@ #The MIT License (MIT) # -#Copyright (c) 2023 rick barrette +#Copyright (c) 2024 rick barrette # #Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: # @@ -9,7 +9,6 @@ #THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. class QboController < ApplicationController - unloadable require 'openssl' diff --git a/app/controllers/vehicles_controller.rb b/app/controllers/vehicles_controller.rb index f2bb620..0830acd 100644 --- a/app/controllers/vehicles_controller.rb +++ b/app/controllers/vehicles_controller.rb @@ -1,6 +1,6 @@ #The MIT License (MIT) # -#Copyright (c) 2022 rick barrette +#Copyright (c) 2024 rick barrette # #Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: # @@ -10,7 +10,6 @@ # This controller class will handle map management class VehiclesController < ApplicationController - unloadable include AuthHelper diff --git a/app/models/customer.rb b/app/models/customer.rb index cb9221a..557e823 100644 --- a/app/models/customer.rb +++ b/app/models/customer.rb @@ -1,6 +1,6 @@ #The MIT License (MIT) # -#Copyright (c) 2023 rick barrette +#Copyright (c) 2024 rick barrette # #Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: # @@ -9,7 +9,6 @@ #THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. class Customer < ActiveRecord::Base - unloadable has_many :issues has_many :purchases diff --git a/app/models/customer_token.rb b/app/models/customer_token.rb index b3af4c4..90f7475 100644 --- a/app/models/customer_token.rb +++ b/app/models/customer_token.rb @@ -1,6 +1,6 @@ #The MIT License (MIT) # -#Copyright (c) 2022 rick barrette +#Copyright (c) 2024 rick barrette # #Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: # @@ -9,7 +9,7 @@ #THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. class CustomerToken < ActiveRecord::Base - unloadable + has_many :issues validates_presence_of :issue_id before_create :generate_token, :generate_expire_date diff --git a/app/models/employee.rb b/app/models/employee.rb index acf6702..ab35227 100644 --- a/app/models/employee.rb +++ b/app/models/employee.rb @@ -1,6 +1,6 @@ #The MIT License (MIT) # -#Copyright (c) 2023 rick barrette +#Copyright (c) 2024 rick barrette # #Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: # @@ -9,7 +9,7 @@ #THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. class Employee < ActiveRecord::Base - unloadable + has_many :users validates_presence_of :id, :name diff --git a/app/models/estimate.rb b/app/models/estimate.rb index 43ebc0a..80c5c70 100644 --- a/app/models/estimate.rb +++ b/app/models/estimate.rb @@ -1,6 +1,6 @@ #The MIT License (MIT) # -#Copyright (c) 2023 rick barrette +#Copyright (c) 2024 rick barrette # #Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: # @@ -9,7 +9,6 @@ #THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. class Estimate < ActiveRecord::Base - unloadable has_and_belongs_to_many :issues belongs_to :customer diff --git a/app/models/invoice.rb b/app/models/invoice.rb index f51ef0b..d4aef06 100644 --- a/app/models/invoice.rb +++ b/app/models/invoice.rb @@ -1,6 +1,6 @@ #The MIT License (MIT) # -#Copyright (c) 2023 rick barrette +#Copyright (c) 2024 rick barrette # #Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: # @@ -9,7 +9,7 @@ #THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. class Invoice < ActiveRecord::Base - unloadable + has_and_belongs_to_many :issues belongs_to :customer validates_presence_of :doc_number, :id, :customer_id, :txn_date diff --git a/app/models/qbo.rb b/app/models/qbo.rb index 06199b7..3392d30 100644 --- a/app/models/qbo.rb +++ b/app/models/qbo.rb @@ -1,6 +1,6 @@ #The MIT License (MIT) # -#Copyright (c) 2023 rick barrette +#Copyright (c) 2024 rick barrette # #Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: # @@ -9,7 +9,6 @@ #THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. class Qbo < ActiveRecord::Base - unloadable include QuickbooksOauth diff --git a/app/models/vehicle.rb b/app/models/vehicle.rb index bc99259..4a61117 100644 --- a/app/models/vehicle.rb +++ b/app/models/vehicle.rb @@ -1,6 +1,6 @@ #The MIT License (MIT) # -#Copyright (c) 2022 rick barrette +#Copyright (c) 2024 rick barrette # #Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: # @@ -10,8 +10,6 @@ class Vehicle < ActiveRecord::Base - unloadable - belongs_to :customer has_many :issues, :foreign_key => 'vehicles_id' diff --git a/db/migrate/032_add_txn_dates.rb b/db/migrate/032_add_txn_dates.rb index 8379d79..a95a27f 100644 --- a/db/migrate/032_add_txn_dates.rb +++ b/db/migrate/032_add_txn_dates.rb @@ -1,6 +1,6 @@ #The MIT License (MIT) # -#Copyright (c) 2023 rick barrette +#Copyright (c) 2024 rick barrette # #Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: # @@ -9,41 +9,46 @@ #THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. class AddTxnDates < ActiveRecord::Migration[5.1] + def change - add_column :qbo_invoices, :txn_date, :date - add_column :qbo_estimates, :txn_date, :date + begin + add_column :qbo_invoices, :txn_date, :date + add_column :qbo_estimates, :txn_date, :date - reversible do |direction| - direction.up { - break unless Qbo.first + reversible do |direction| + direction.up { + break unless Qbo.first - QboEstimate.reset_column_information - QboInvoice.reset_column_information + QboEstimate.reset_column_information + QboInvoice.reset_column_information - say "Sync Estimates" + say "Sync Estimates" - QboEstimate.sync + QboEstimate.sync - say "Sync Invoices" + say "Sync Invoices" - qbo = Qbo.first - invoices = qbo.perform_authenticated_request do |access_token| - service = Quickbooks::Service::Invoice.new(:company_id => qbo.realm_id, :access_token => access_token) - service.all - end + qbo = Qbo.first + invoices = qbo.perform_authenticated_request do |access_token| + service = Quickbooks::Service::Invoice.new(:company_id => qbo.realm_id, :access_token => access_token) + service.all + end - return unless invoices + return unless invoices - invoices.each { |invoice| - # Load the invoice into the database - qbo_invoice = QboInvoice.find_or_create_by(id: invoice.id) - qbo_invoice.doc_number = invoice.doc_number - qbo_invoice.id = invoice.id - qbo_invoice.customer_id = invoice.customer_ref - qbo_invoice.txn_date = invoice.txn_date - qbo_invoice.save! + invoices.each { |invoice| + # Load the invoice into the database + qbo_invoice = QboInvoice.find_or_create_by(id: invoice.id) + qbo_invoice.doc_number = invoice.doc_number + qbo_invoice.id = invoice.id + qbo_invoice.customer_id = invoice.customer_ref + qbo_invoice.txn_date = invoice.txn_date + qbo_invoice.save! + } } - } + end + rescue + logger.error "AddTxnDates Failed" end end diff --git a/db/migrate/033_update_vehicles_trim.rb b/db/migrate/033_update_vehicles_trim.rb index c94f05b..dc5ace2 100644 --- a/db/migrate/033_update_vehicles_trim.rb +++ b/db/migrate/033_update_vehicles_trim.rb @@ -1,6 +1,6 @@ #The MIT License (MIT) # -#Copyright (c) 2022 rick barrette +#Copyright (c) 2024 rick barrette # #Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: # @@ -10,19 +10,22 @@ class UpdateVehiclesTrim < ActiveRecord::Migration[5.1] def change - add_column :vehicles, :doors, :text - add_column :vehicles, :trim, :text + begin + add_column :vehicles, :doors, :text + add_column :vehicles, :trim, :text - reversible do |direction| - direction.up { - - # Update local vehicle database by forcing a save, look at before_save - vehicles = Vehicle.all - vehicles.each { |vehicle| - vehicle.save! - } + reversible do |direction| + direction.up { + # Update local vehicle database by forcing a save, look at before_save + vehicles = Vehicle.all + vehicles.each { |vehicle| + vehicle.save! + } } + end + rescue + logger.error "Failed to update vehicles" end end diff --git a/lib/attachments_controller_patch.rb b/lib/attachments_controller_patch.rb index 37e2eaf..69d2a7f 100644 --- a/lib/attachments_controller_patch.rb +++ b/lib/attachments_controller_patch.rb @@ -1,6 +1,6 @@ #The MIT License (MIT) # -#Copyright (c) 2022 rick barrette +#Copyright (c) 2024 rick barrette # #Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: # @@ -15,7 +15,6 @@ module AttachmentsControllerPatch def self.included(base) base.class_eval do - unloadable # Send unloadable so it will not be unloaded in development # check if login is globally required to access the application def check_if_login_required diff --git a/lib/issue_patch.rb b/lib/issue_patch.rb index a804bff..d5293b8 100644 --- a/lib/issue_patch.rb +++ b/lib/issue_patch.rb @@ -1,6 +1,6 @@ #The MIT License (MIT) # -#Copyright (c) 2023 rick barrette +#Copyright (c) 2024 rick barrette # #Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: # @@ -21,7 +21,6 @@ module IssuePatch # Same as typing in the class base.class_eval do - unloadable # Send unloadable so it will not be unloaded in development belongs_to :customer, primary_key: :id belongs_to :customer_token, primary_key: :id belongs_to :estimate, primary_key: :id diff --git a/lib/issues_controller_patch.rb b/lib/issues_controller_patch.rb index 98019f0..85b3d70 100644 --- a/lib/issues_controller_patch.rb +++ b/lib/issues_controller_patch.rb @@ -1,6 +1,6 @@ #The MIT License (MIT) # -#Copyright (c) 2022 rick barrette +#Copyright (c) 2024 rick barrette # #Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: # @@ -23,7 +23,6 @@ module IssuesControllerPatch def self.included(base) base.class_eval do - unloadable # Send unloadable so it will not be unloaded in development helper Helper end diff --git a/lib/pdf_patch.rb b/lib/pdf_patch.rb index 803f045..274bf57 100644 --- a/lib/pdf_patch.rb +++ b/lib/pdf_patch.rb @@ -1,6 +1,6 @@ #The MIT License (MIT) # -#Copyright (c) 2023 rick barrette +#Copyright (c) 2024 rick barrette # #Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: # @@ -16,10 +16,8 @@ module PdfPatch def self.included(base) base.send(:include, InstanceMethods) base.class_eval do - unloadable # Send unloadable so it will not be unloaded in development alias_method :issue_to_pdf, :issue_to_pdf_with_patch alias_method :issue_to_pdf_with_patch, :issue_to_pdf - end end diff --git a/lib/project_patch.rb b/lib/project_patch.rb index 907031c..925bde6 100644 --- a/lib/project_patch.rb +++ b/lib/project_patch.rb @@ -1,6 +1,6 @@ #The MIT License (MIT) # -#Copyright (c) 2017 rick barrette +#Copyright (c) 2024 rick barrette # #Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: # @@ -21,7 +21,6 @@ module ProjectPatch # Same as typing in the class base.class_eval do - unloadable # Send unloadable so it will not be unloaded in development belongs_to :customer, primary_key: :id belongs_to :vehicle, primary_key: :id end diff --git a/lib/user_patch.rb b/lib/user_patch.rb index 3a6e494..5b78a74 100644 --- a/lib/user_patch.rb +++ b/lib/user_patch.rb @@ -1,6 +1,6 @@ #The MIT License (MIT) # -#Copyright (c) 2022 rick barrette +#Copyright (c) 2024 rick barrette # #Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: # @@ -20,7 +20,6 @@ module UserPatch # Same as typing in the class base.class_eval do - unloadable # Send unloadable so it will not be unloaded in development belongs_to :employee, primary_key: :id end end