Merge pull request #148 from finnlabs/feature/rails4-remove-unloadable

[Rails4] fix constant reloading issues: remove unloadable
pull/6827/head
ulferts 9 years ago
commit 61e3006b80
  1. 1
      app/controllers/cost_objects_controller.rb
  2. 1
      app/controllers/cost_types_controller.rb
  3. 1
      app/controllers/costlog_controller.rb
  4. 1
      app/controllers/hourly_rates_controller.rb
  5. 1
      app/models/cost_entry.rb
  6. 1
      app/models/cost_object.rb
  7. 1
      app/models/costs_work_package_observer.rb
  8. 1
      app/models/labor_budget_item.rb
  9. 1
      app/models/material_budget_item.rb
  10. 1
      app/models/variable_cost_object.rb
  11. 1
      lib/open_project/costs/patches/project_patch.rb
  12. 3
      lib/open_project/costs/patches/query_patch.rb
  13. 1
      lib/open_project/costs/patches/role_patch.rb
  14. 1
      lib/open_project/costs/patches/time_entry_patch.rb
  15. 1
      lib/open_project/costs/patches/user_patch.rb
  16. 1
      lib/open_project/costs/patches/work_package_patch.rb
  17. 1
      lib/open_project/costs/patches/work_package_schema_patch.rb
  18. 1
      lib/open_project/costs/patches/work_packages_helper_patch.rb

@ -18,7 +18,6 @@
#++
class CostObjectsController < ApplicationController
unloadable
before_filter :find_cost_object, :only => [:show, :edit, :update, :copy]
before_filter :find_cost_objects, :only => :destroy

@ -18,7 +18,6 @@
#++
class CostTypesController < ApplicationController
unloadable
# Allow only admins here
before_filter :require_admin

@ -18,7 +18,6 @@
#++
class CostlogController < ApplicationController
unloadable
menu_item :work_packages
before_filter :find_project, :authorize, :only => [:edit,

@ -18,7 +18,6 @@
#++
class HourlyRatesController < ApplicationController
unloadable
helper :users
helper :sort

@ -18,7 +18,6 @@
#++
class CostEntry < ActiveRecord::Base
unloadable
belongs_to :project
belongs_to :work_package

@ -20,7 +20,6 @@
# A CostObject is an item that is created as part of the project. These items
# contain a collection of work packages.
class CostObject < ActiveRecord::Base
unloadable
belongs_to :author, :class_name => 'User', :foreign_key => 'author_id'
belongs_to :project

@ -18,7 +18,6 @@
#++
class CostsWorkPackageObserver < ActiveRecord::Observer
unloadable
observe :work_package
def after_update(work_package)

@ -18,7 +18,6 @@
#++
class LaborBudgetItem < ActiveRecord::Base
unloadable
belongs_to :cost_object
belongs_to :user

@ -18,7 +18,6 @@
#++
class MaterialBudgetItem < ActiveRecord::Base
unloadable
belongs_to :cost_object
belongs_to :cost_type

@ -18,7 +18,6 @@
#++
class VariableCostObject < CostObject
unloadable
has_many :material_budget_items, :include => :cost_type,
:foreign_key => 'cost_object_id',

@ -23,7 +23,6 @@ module OpenProject::Costs::Patches::ProjectPatch
base.include(InstanceMethods)
base.class_eval do
unloadable
has_many :cost_objects, :dependent => :destroy
has_many :rates, :class_name => 'HourlyRate'

@ -19,7 +19,6 @@
module OpenProject::Costs::Patches::QueryPatch
class CurrencyQueryColumn < QueryColumn
unloadable
include ActionView::Helpers::NumberHelper
alias :super_value :value
@ -47,8 +46,6 @@ module OpenProject::Costs::Patches::QueryPatch
# Same as typing in the class
base.class_eval do
unloadable # Send unloadable so it will not be unloaded in development
add_available_column(QueryColumn.new(:cost_object_subject))
add_available_column(CurrencyQueryColumn.new(:material_costs))
add_available_column(CurrencyQueryColumn.new(:labor_costs))

@ -23,7 +23,6 @@ module OpenProject::Costs::Patches::RolePatch
# Same as typing in the class
base.class_eval do
unloadable
alias_method_chain :allowed_to?, :inheritance
end

@ -26,7 +26,6 @@ module OpenProject::Costs::Patches::TimeEntryPatch
# Same as typing in the class t.update_costs
base.class_eval do
unloadable
belongs_to :rate, :conditions => {:type => ["HourlyRate", "DefaultHourlyRate"]}, :class_name => "Rate"
attr_protected :costs, :rate_id

@ -22,7 +22,6 @@ module OpenProject::Costs::Patches::UserPatch
base.send(:include, InstanceMethods)
base.class_eval do
unloadable
has_many :rates, :class_name => 'HourlyRate'
has_many :default_rates, :class_name => 'DefaultHourlyRate'

@ -25,7 +25,6 @@ module OpenProject::Costs::Patches::WorkPackagePatch
# Same as typing in the class
base.class_eval do
unloadable
belongs_to :cost_object, :inverse_of => :work_packages
has_many :cost_entries, :dependent => :delete_all

@ -38,7 +38,6 @@ require_dependency 'api/v3/work_packages/schema/work_package_schema'
module OpenProject::Costs::Patches::WorkPackageSchemaPatch
def self.included(base)
base.class_eval do
unloadable
include InstanceMethods
extend ClassMethods

@ -20,7 +20,6 @@
module OpenProject::Costs::Patches::WorkPackagesHelperPatch
def self.included(base)
base.class_eval do
unloadable
def work_package_form_all_middle_attributes_with_costs(form, work_package, locals = {})
attributes = work_package_form_all_middle_attributes_without_costs(form, work_package, locals)

Loading…
Cancel
Save