On Tue, Feb 22, 2011 at 1:18 PM, John Merlino wrote:
> Hey all,
>
> I have this in my plugins directory:
>
> 1: <% if current_user && current_user.admin? %>
> 2:
> 3:
> 4: <%= link_to 'New Blog Post',
> new_blog_post_path %>
>
> As you can see,it references current_user
>
> So I def
Hey all,
I have this in my plugins directory:
1: <% if current_user && current_user.admin? %>
2:
3:
4: <%= link_to 'New Blog Post',
new_blog_post_path %>
As you can see,it references current_user
So I define current_user in User model as a global variable:
cattr_accessor :curren
2 matches
Mail list logo