Skip to content
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

ActionView::Template::Error (undefined method `can_user_pretend_to?' #25

Open
radist opened this issue Dec 5, 2016 · 3 comments
Open

Comments

@radist
Copy link

radist commented Dec 5, 2016

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

@onlyjob
Copy link
Contributor

onlyjob commented Aug 13, 2017

I'm experiencing this problem as well...

@dpaleino
Copy link

Still present in 3.3.1.

@masgo
Copy link

masgo commented Oct 11, 2018

still present in 3.4.4.stable

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants