From 1bc9227c7f0fa5f26df007453755b8a94bb1e73e Mon Sep 17 00:00:00 2001 From: Rick Barrette Date: Thu, 22 Jan 2026 20:43:06 -0500 Subject: [PATCH] finish redmine-6 merge into dev --- init.rb | 6 +---- lib/patches/project_patch.rb | 44 ++++++++++++++++++------------------ 2 files changed, 23 insertions(+), 27 deletions(-) diff --git a/init.rb b/init.rb index 234f835..8466250 100644 --- a/init.rb +++ b/init.rb @@ -28,11 +28,7 @@ Redmine::Plugin.register :redmine_qbo do User.safe_attributes 'employee_id' TimeEntry.safe_attributes 'billed' Project.safe_attributes 'customer_id' - Project.safe_attributes 'vehicle_id' - - # We are playing in the sandbox - #Quickbooks.sandbox_mode = true - + # set per_page globally WillPaginate.per_page = 20 diff --git a/lib/patches/project_patch.rb b/lib/patches/project_patch.rb index b6fb61e..a495ff6 100644 --- a/lib/patches/project_patch.rb +++ b/lib/patches/project_patch.rb @@ -12,33 +12,33 @@ require_dependency 'project' module Patches -# Patches Redmine's Projects dynamically. -# Adds a relationships -module ProjectPatch + # Patches Redmine's Projects dynamically. + # Adds a relationships + module ProjectPatch - def self.included(base) # :nodoc: - base.extend(ClassMethods) + def self.included(base) # :nodoc: + base.extend(ClassMethods) - base.send(:include, InstanceMethods) + base.send(:include, InstanceMethods) - # 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 - end -end + # Same as typing in the class + base.class_eval do + belongs_to :customer, primary_key: :id + belongs_to :vehicle, primary_key: :id + end + end -module ClassMethods + end + + module ClassMethods + + end -end + module InstanceMethods -module InstanceMethods - -end - -# Add module to Project -Project.send(:include, ProjectPatch) + end + + # Add module to Project + Project.send(:include, ProjectPatch) end \ No newline at end of file