Search code examples
ruby-on-railsrubyruby-on-rails-4redmineredmine-plugins

How to require redmine core components, such as models etc., in redmine plugin?


i would like to include core components (to be specific: the group Model) in my redmine plugin.

Is there a special require statement for doing this?

I want to use the redmine Group Model in a rake task of my Plugin.

I tried using require_dependency and require, but none of these works.

I appreciate every kind of help :)


Solution

  • The error was that redmine could not load the i18n module, solved the bug, added require 'redmine' in my plugins init.rb and not in my rake task file inside lib/tasks of the redmine plugin, now I can access the group model in my rake task.