-
Notifications
You must be signed in to change notification settings - Fork 48
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
Redmine 2.3 (using redmine2.0 branch) - undefined method 'remote function' #29
Comments
I managed to get it working with some #rails help. did a gem "prototype-rails" to the Redmine Gemfile. Now that Redmine knows about it, I added require 'prototype-rails' to the list of requires in the plugin init.rb file. Now it will let me get into the issues reminder page, but I can't add any reminders, presumably because the query is empty and I can't add one. |
Just tried to see if a public custom query would show up, and it crashes out since rails 3.2 does not have |
Patch attached. diff --git a/app/views/reminders/index.html.erb b/app/views/reminders/index.html.erb
index dc9e010..86a4bdd 100644
--- a/app/views/reminders/index.html.erb
+++ b/app/views/reminders/index.html.erb
@@ -20,7 +20,7 @@
"$('reminder-#{reminder.id}-edit').show(); return false;",
:class => 'icon icon-edit'
%>
- <%= link_to_remote(l(:button_delete), { :url => {:controller => 'reminders', :action => 'destroy', :id => reminder},
+ <%= link_to(l(:button_delete), { :url => {:controller => 'reminders', :action => 'destroy', :id => reminder},
:method => :delete,
:confirm => l(:reminder_delete_confirmation)
}, :title => l(:button_delete),
diff --git a/init.rb b/init.rb
index 40612d9..278d01f 100644
--- a/init.rb
+++ b/init.rb
@@ -1,5 +1,6 @@
require 'redmine'
require 'active_support/core_ext'
+require 'prototype-rails'
# This plugin should be reloaded in development mode.
if Rails.env == 'development' |
even after patching the plugin there are errors. :( |
Fixed delete function for Redmine 2.5.1.stable (Rails 3) diff --git a/app/views/reminders/index.html.erb b/app/views/reminders/index.html.erb
index c1fe610..d25d210 100644
--- a/app/views/reminders/index.html.erb
+++ b/app/views/reminders/index.html.erb
@@ -20,11 +20,10 @@
"$('reminder-#{reminder.id}-edit').show(); return false;",
:class => 'icon icon-edit'
%>
- <%= link_to(l(:button_delete), { :url => {:controller => 'reminders', :action => 'destroy', :id => reminder},
- :method => :delete,
- :confirm => l(:reminder_delete_confirmation)
- }, :title => l(:button_delete),
- :class => 'icon icon-del') %>
+ <%= link_to l(:button_delete),
+ {:controller => 'reminders', :action => :destroy, :id => reminder},
+ {:confirm => l(:reminder_delete_confirmation), :method => :delete, :remote => true, :title => l(:button_delete), :class => 'icon icon-del'}
+ %>
</td>
</tr>
<tr id="reminder-<%= reminder.id %>-edit" style="display:none"> |
rake db:migrate_plugins
creates the table correctly (the README saysdb:migrate:plugins
).I can enable the module for a project, but when I click on the new "issues reminder" tab for the project, I get an HTTP 500 error and the production.log has the following and an ugly backtrace:
This is because
remote_function
was removed from Rails 3.1.The text was updated successfully, but these errors were encountered: