redmine_pretend
redmine_pretend copied to clipboard
ActionView::Template::Error (undefined method `can_user_pretend_to?'
Started GET "/users/9" for 87.***.37.120 at 2016-12-05 23:54:08 +0300
Processing by UsersController#show as HTML
Parameters: {"id"=>"9"}
Current user: radist (id=4)
Rendered plugins/redmine_contacts/app/views/users/_contact.html.erb (13.6ms)
Rendered plugins/redmine_pretend/app/views/user/_pretend_to.html.erb (2747.5ms)
Rendered users/show.html.erb within layouts/base (2804.4ms)
Completed 500 Internal Server Error in 2975ms (ActiveRecord: 10.0ms)
ActionView::Template::Error (undefined method `can_user_pretend_to?' for #<#<Class:0x0000000cbaefa8>:0x0000000c64dac8>):
1: <%= link_to(l(:button_pretend), pretend_to_path(@user), :class => 'icon', :method => :post) if can_user_pretend_to?(@user) %>
lib/redmine/hook.rb:119:in `block (2 levels) in render_on'
lib/redmine/hook.rb:117:in `map'
lib/redmine/hook.rb:117:in `block in render_on'
lib/redmine/hook.rb:61:in `block (2 levels) in call_hook'
lib/redmine/hook.rb:61:in `each'
lib/redmine/hook.rb:61:in `block in call_hook'
lib/redmine/hook.rb:58:in `tap'
lib/redmine/hook.rb:58:in `call_hook'
lib/redmine/hook.rb:167:in `call_hook'
app/views/users/show.html.erb:35:in `_30600166e81510f1f5a24b0fcb8c6936'
app/controllers/users_controller.rb:77:in `block (2 levels) in show'
app/controllers/users_controller.rb:73:in `show'
lib/redmine/sudo_mode.rb:63:in `sudo_mode'
Environment: Redmine version 3.1.6.stable Ruby version 2.0.0-p643 (2015-02-25) [x86_64-linux] Rails version 4.2.5.2 Environment production Database adapter Mysql2
I'm experiencing this problem as well...
Still present in 3.3.1.
still present in 3.4.4.stable