dari acl_system2
# restrict_to "admin | moderator" do
# link_to "foo"
# end
def restrict_to(logicstring, context = {})
return false if current_user.nil?
result = ''
if permit?(logicstring, context)
result = yield if block_given?
end
result
endide yielding nya lumayan rapi dijadiin helper! ;-) -- Arie | http://www.linkedin.com/in/ariekeren http://ariekusumaatmaja.wordpress.com | http://groups.yahoo.com/groups/id-ruby use it with haml! Oops!

