Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set compatibility to redmine 5.x #74

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
gem 'deep_cloneable', git: 'https://github.com/moiristo/deep_cloneable.git', ref: '1d67dd44031b1df7ae77c8a33b4afd39ade7706f'
gem 'deep_cloneable', git: 'https://github.com/moiristo/deep_cloneable.git', tag: 'v3.2.0'

group :test do
gem 'rails-controller-testing'
Expand Down
6 changes: 3 additions & 3 deletions app/controllers/recurring_tasks_controller.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
class RecurringTasksController < ApplicationController
before_action :set_schedule, only: [:edit, :destroy, :update]
before_action :set_issue
before_action :check_permission
before_filter :set_schedule, only: [:edit, :destroy, :update]
before_filter :set_issue
before_filter :check_permission

def new
existing_schedule = RecurringTask.find_by(issue: @issue)
Expand Down
5 changes: 4 additions & 1 deletion init.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
require 'redmine_recurring_tasks'
require 'redmine'
require_relative 'lib/redmine_recurring_tasks'

reloader = defined?(ActiveSupport::Reloader) ? ActiveSupport::Reloader : ActionDispatch::Reloader
reloader.to_prepare do
Expand Down Expand Up @@ -33,3 +34,5 @@
permission :manage_schedule, recurring_tasks: [:new, :edit, :destroy, :update], require: :loggedin
end
end

require File.dirname(__FILE__) + '/lib/redmine_recurring_tasks'