# Access authlogic current\_user in actionmailer view

**URL:** <https://www.ruby-forum.com/t/access-authlogic-current-user-in-actionmailer-view/184418>\
**Category:** Rails\
**Created:** [March 2, 2010, 9:36am UTC](https://www.ruby-forum.com/t/access-authlogic-current-user-in-actionmailer-view/184418 "2010-03-02T09:36:02Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![tom-mac](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/bc8723/32.png) [@tom-mac](https://www.ruby-forum.com/u/tom-mac)\
**Post date:** [March 2, 2010, 9:36am UTC](https://www.ruby-forum.com/t/access-authlogic-current-user-in-actionmailer-view/184418/1 "2010-03-02T09:36:02Z")

</div>

Hi  
I am using authlogic and having current\_user as a private method in  
application controller . Now I would like to know how I can access that  
in my actionmailer view Or actionmailer class

Thanks in advance  
Tom

---

<div class="post-metadata">

**Author:** ![tom-mac](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/bc8723/32.png) [@tom-mac](https://www.ruby-forum.com/u/tom-mac)\
**Post date:** [March 3, 2010, 4:34am UTC](https://www.ruby-forum.com/t/access-authlogic-current-user-in-actionmailer-view/184418/2 "2010-03-03T04:34:32Z")

</div>

Hi

Still I can’t solve it.Please help

Tom

---

<div class="post-metadata">

**Author:** ![tom-mac](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/bc8723/32.png) [@tom-mac](https://www.ruby-forum.com/u/tom-mac)\
**Post date:** [March 3, 2010, 11:24am UTC](https://www.ruby-forum.com/t/access-authlogic-current-user-in-actionmailer-view/184418/3 "2010-03-03T11:24:17Z")

</div>

Have you tried changing it to protected instead of private?

---

<div class="post-metadata">

**Author:** ![tom-mac](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/bc8723/32.png) [@tom-mac](https://www.ruby-forum.com/u/tom-mac)\
**Post date:** [March 3, 2010, 12:53pm UTC](https://www.ruby-forum.com/t/access-authlogic-current-user-in-actionmailer-view/184418/4 "2010-03-03T12:53:31Z")

</div>

Hi  
I have already tried that. Anyway I could solve it y passing  
current\_user from controller and called that mail sending in model from  
controller

Thanks  
Tom

---

<div class="post-metadata">

**Author:** ![tom-mac](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/bc8723/32.png) [@tom-mac](https://www.ruby-forum.com/u/tom-mac)\
**Post date:** [March 3, 2010, 10:16pm UTC](https://www.ruby-forum.com/t/access-authlogic-current-user-in-actionmailer-view/184418/5 "2010-03-03T22:16:15Z")

</div>

I believe actionmailer view helpers don’t inherit from  
actioncontrollers view helpers… therefore you need to pass it  
through

OR

at the top of your actionmailer class, set an instance variable with  
the information so you can use it in your views.
