mirror of
https://github.com/rickbarrette/redmine_qbo.git
synced 2026-02-13 01:03:59 -05:00
finish redmine-6 merge into dev
This commit is contained in:
6
init.rb
6
init.rb
@@ -28,11 +28,7 @@ Redmine::Plugin.register :redmine_qbo do
|
|||||||
User.safe_attributes 'employee_id'
|
User.safe_attributes 'employee_id'
|
||||||
TimeEntry.safe_attributes 'billed'
|
TimeEntry.safe_attributes 'billed'
|
||||||
Project.safe_attributes 'customer_id'
|
Project.safe_attributes 'customer_id'
|
||||||
Project.safe_attributes 'vehicle_id'
|
|
||||||
|
|
||||||
# We are playing in the sandbox
|
|
||||||
#Quickbooks.sandbox_mode = true
|
|
||||||
|
|
||||||
# set per_page globally
|
# set per_page globally
|
||||||
WillPaginate.per_page = 20
|
WillPaginate.per_page = 20
|
||||||
|
|
||||||
|
|||||||
@@ -12,33 +12,33 @@ require_dependency 'project'
|
|||||||
|
|
||||||
module Patches
|
module Patches
|
||||||
|
|
||||||
# Patches Redmine's Projects dynamically.
|
# Patches Redmine's Projects dynamically.
|
||||||
# Adds a relationships
|
# Adds a relationships
|
||||||
module ProjectPatch
|
module ProjectPatch
|
||||||
|
|
||||||
def self.included(base) # :nodoc:
|
def self.included(base) # :nodoc:
|
||||||
base.extend(ClassMethods)
|
base.extend(ClassMethods)
|
||||||
|
|
||||||
base.send(:include, InstanceMethods)
|
base.send(:include, InstanceMethods)
|
||||||
|
|
||||||
# Same as typing in the class
|
# Same as typing in the class
|
||||||
base.class_eval do
|
base.class_eval do
|
||||||
unloadable # Send unloadable so it will not be unloaded in development
|
belongs_to :customer, primary_key: :id
|
||||||
belongs_to :customer, primary_key: :id
|
belongs_to :vehicle, primary_key: :id
|
||||||
belongs_to :vehicle, primary_key: :id
|
end
|
||||||
end
|
end
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
module ClassMethods
|
end
|
||||||
|
|
||||||
|
module ClassMethods
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
end
|
module InstanceMethods
|
||||||
|
|
||||||
module InstanceMethods
|
end
|
||||||
|
|
||||||
end
|
# Add module to Project
|
||||||
|
Project.send(:include, ProjectPatch)
|
||||||
# Add module to Project
|
|
||||||
Project.send(:include, ProjectPatch)
|
|
||||||
|
|
||||||
end
|
end
|
||||||
Reference in New Issue
Block a user