I have been following the Redmine Plugin Tutorial and read the page on Hooks, but I still can't get my plugins partials to render, using the render_on
keyword or otherwise.
Here's where I'm putting my partials:
app
└── views
├── issues
│ └── _issue_mail_settings_form.html.erb
└── projects
└── _mail_settings_form.html.erb
Here is my class with the render_on
keyword, which is in the lib
directory:
class MailSettingIssueHooks < Redmine::Hook::ViewListener
render_on :view_issues_form_details_bottom,
:partial => "issues/issue_mail_settings_form"
end
In init.rb I just require 'mail_setting_issue_hooks'
.
If I load Redmine up like this, I can't view the page for any issues - I just get a 404 error. Console output for the request is here, though it doesn't look useful.
If I define a method named view_issues_form_details_bottom
in MailSettingIssueHooks
and it returns a string, that renders correctly.
How does the render_on
keyword decide where to look for partials, and how can I get it working?