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

Make the plugin compatible with Redmine 2.x. #7

Open
wants to merge 2 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
12 changes: 9 additions & 3 deletions init.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,16 @@
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.

require 'redmine'
require 'dispatcher'
require 'dispatcher' unless Rails::VERSION::MAJOR >= 3

Dispatcher.to_prepare do
require 'redmine_ical/patch_redmine_classes'
if Rails::VERSION::MAJOR >= 3
ActionDispatch::Callbacks.to_prepare do
require 'redmine_ical/patch_redmine_classes'
end
else
Dispatcher.to_prepare do
require 'redmine_ical/patch_redmine_classes'
end
end

require_dependency 'redmine_ical/view_hooks'
Expand Down
2 changes: 1 addition & 1 deletion lib/redmine_ical/patch_redmine_classes.rb
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ def self.included(receiver)
unloadable
include ApplicationHelper
alias_method_chain :show, :ical
accept_api_auth :show
accept_rss_auth :show
end
end
end
Expand Down