Project

General

Profile

I'm writing a plugin ,and i need a little help...

Added by Archie Con over 13 years ago

My problem is i my plugin to be accessed only by logger
users, so i use :if symbol in my init.rb file of my
plugin .The result i cannot start my application anymore.

Here is my init.rb:

menu :account_menu , :teams, {:controller => 'teams', :action => 'index' }, :caption => 'Teams_register', :if => User.current.logged? 

Replies (1)

RE: I'm writing a plugin ,and i need a little help... - Added by Felix Schäfer over 13 years ago

Archie Con wrote:

[...]

You must past a Proc to the :if parameter. Something like :if => Proc.new { User.current.logged? } should do.

    (1-1/1)