Skip to content

Commit

Permalink
remove unloadable
Browse files Browse the repository at this point in the history
  • Loading branch information
haru committed Dec 30, 2023
1 parent 5c2e13b commit 8476d38
Show file tree
Hide file tree
Showing 11 changed files with 12 additions and 23 deletions.
5 changes: 2 additions & 3 deletions app/controllers/code_review_controller.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Code Review plugin for Redmine
# Copyright (C) 2009-2022 Haruyuki Iida
# Copyright (C) 2009-2023 Haruyuki Iida
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
Expand All @@ -15,8 +15,7 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.

class CodeReviewController < ApplicationController
unloadable
class CodeReviewController < ApplicationController
before_action :find_project, :authorize, :find_user, :find_setting, :find_repository, :find_priorities

helper :sort
Expand Down
3 changes: 1 addition & 2 deletions app/controllers/code_review_settings_controller.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Code Review plugin for Redmine
# Copyright (C) 2010 Haruyuki Iida
# Copyright (C) 2023 Haruyuki Iida
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
Expand All @@ -16,7 +16,6 @@
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.

class CodeReviewSettingsController < ApplicationController
unloadable
layout 'base'
menu_item :code_review
include CodeReviewAutoAssignSettings
Expand Down
3 changes: 1 addition & 2 deletions app/helpers/code_review_helper.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Code Review plugin for Redmine
# Copyright (C) 2009-2011 Haruyuki Iida
# Copyright (C) 2009-2023 Haruyuki Iida
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
Expand All @@ -15,7 +15,6 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
module CodeReviewHelper
unloadable

def show_assignments(assignments, project, options = {})
html = "#{l(:review_assignments)}:"
Expand Down
3 changes: 1 addition & 2 deletions app/models/code_review.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Code Review plugin for Redmine
# Copyright (C) 2009-2022 Haruyuki Iida
# Copyright (C) 2009-2023 Haruyuki Iida
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
Expand All @@ -16,7 +16,6 @@
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
class CodeReview < ActiveRecord::Base
include Redmine::SafeAttributes
unloadable
belongs_to :project
belongs_to :change
belongs_to :issue
Expand Down
3 changes: 1 addition & 2 deletions app/models/code_review_assignment.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Code Review plugin for Redmine
# Copyright (C) 2010-2011 Haruyuki Iida
# Copyright (C) 2010-2023 Haruyuki Iida
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
Expand All @@ -16,7 +16,6 @@
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.

class CodeReviewAssignment < ActiveRecord::Base
unloadable
belongs_to :issue
belongs_to :change
belongs_to :changeset
Expand Down
3 changes: 1 addition & 2 deletions app/models/code_review_project_setting.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Code Review plugin for Redmine
# Copyright (C) 2009-2015 Haruyuki Iida
# Copyright (C) 2009-2023 Haruyuki Iida
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
Expand All @@ -15,7 +15,6 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
class CodeReviewProjectSetting < ActiveRecord::Base
unloadable
include Redmine::SafeAttributes
include CodeReviewAutoAssignSettings

Expand Down
3 changes: 1 addition & 2 deletions app/models/code_review_user_setting.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Code Review plugin for Redmine
# Copyright (C) 2011 Haruyuki Iida
# Copyright (C) 2023 Haruyuki Iida
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
Expand All @@ -15,7 +15,6 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
class CodeReviewUserSetting < ActiveRecord::Base
unloadable
belongs_to :user

validates_presence_of :user_id
Expand Down
3 changes: 1 addition & 2 deletions lib/code_review_attachment_patch.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Code Review plugin for Redmine
# Copyright (C) 2009-2011 Haruyuki Iida
# Copyright (C) 2009-2023 Haruyuki Iida
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
Expand All @@ -22,7 +22,6 @@ def self.included(base) # :nodoc:
base.send(:include, AttachmentInstanceMethodsCodeReview)

base.class_eval do
unloadable # Send unloadable so it will not be unloaded in development
has_many :code_reviews
has_many :code_review_assignments
end
Expand Down
3 changes: 1 addition & 2 deletions lib/code_review_change_patch.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Code Review plugin for Redmine
# Copyright (C) 2009-2015 Haruyuki Iida
# Copyright (C) 2009-2023 Haruyuki Iida
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
Expand All @@ -22,7 +22,6 @@ def self.included(base) # :nodoc:
base.send(:include, ChangeInstanceMethodsCodeReview)

base.class_eval do
unloadable # Send unloadable so it will not be unloaded in development
has_many :code_reviews, :dependent => :destroy
has_many :code_review_assignments, :dependent => :destroy
after_save :review_auto_assign
Expand Down
3 changes: 1 addition & 2 deletions lib/code_review_changeset_patch.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Code Review plugin for Redmine
# Copyright (C) 2009-2015 Haruyuki Iida
# Copyright (C) 2009-2023 Haruyuki Iida
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
Expand All @@ -20,7 +20,6 @@
module CodeReviewChangesetPatch
def self.included(base) # :nodoc:
base.class_eval do
unloadable # Send unloadable so it will not be unloaded in development
has_many :code_review_assignments, :dependent => :destroy
end
end
Expand Down
3 changes: 1 addition & 2 deletions lib/code_review_issue_patch.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Code Review plugin for Redmine
# Copyright (C) 2009-2011 Haruyuki Iida
# Copyright (C) 2009-2023 Haruyuki Iida
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
Expand All @@ -22,7 +22,6 @@ def self.included(base) # :nodoc:
base.send(:include, IssueInstanceMethodsCodeReview)

base.class_eval do
unloadable # Send unloadable so it will not be unloaded in development
has_one :code_review, :dependent => :destroy
has_one :code_review_assignment, :dependent => :destroy
end
Expand Down

0 comments on commit 8476d38

Please sign in to comment.