Project

General

Profile

porting redmine 1.x plugin to redmine 2.x

Added by Marco Nobler over 11 years ago

Hi,

i'm triyng to port a redmine 1.x plugin to redmine 2.1.2.

I'm facing with a problem with patching modules:
I need to patch application helper and some other modules but probably i'm making some mistakes, attached can find the code:

plugins/redmine_tlcit/init.rb
plugins/redmine_tlcit/lib/redmine_tlcit/patches/application_helper_patch.rb

but i have this run-time error, it seems have not loaded the patch definitions:
ActionView::Template::Error (undefined method `prompt_to_remote' for #<#<Class:0x7f7b8d368610>:0x7f7b8d0d5498>):
13: <% end >
14: <
unless @project.issue_categories.empty? >
15: <p><
= f.select :category_id, (@project.issue_categories.collect {|c| [c.name, c.id]}), :include_blank => true >
16: <
= prompt_to_remote(image_tag('add.png', :style => 'vertical-align: middle;'),
17: l(:label_issue_category_new),
18: 'category[name]',
19: {:controller => 'issue_categories', :action => 'new', :project_id => Herve Harster},
app/views/issues/_form.html.erb:41:in `_app_views_issues__form_html_erb___1076854482_70084312332980'
app/helpers/application_helper.rb:985:in `labelled_fields_for'
app/views/issues/_form.html.erb:1:in `_app_views_issues__form_html_erb___1076854482_70084312332980'
app/views/issues/_edit.html.erb:8:in `_app_views_issues__edit_html_erb__1983334900_70084312901780'
app/helpers/application_helper.rb:978:in `labelled_form_for'
app/views/issues/_edit.html.erb:1:in `_app_views_issues__edit_html_erb__1983334900_70084312901780'
app/controllers/issues_controller.rb:117:in `show'
app/controllers/issues_controller.rb:114:in `show'

thanks in advance
Marco

init.rb (1.7 KB) init.rb plugins/redmine_tlcit/init.rb
application_helper_patch.rb (688 Bytes) application_helper_patch.rb plugins/redmine_tlcit/lib/redmine_tlcit/patches/application_helper_patch.rb