Permissions on nested link

12 views
Skip to first unread message

Cassio Almeida

unread,
May 7, 2015, 8:11:00 AM5/7/15
to actives...@googlegroups.com
I have the Client and Exam models:

class Client < ActiveRecord::Base
  has_many
:exams, dependent: :destroy
end


class Exam < ActiveRecord::Base
  belongs_to
:client
end


in clients controller:

class ClientsController < ApplicationController
  active_scaffold
:client do |config|
    config
.nested.add_link(:exams)
 
end
end


How do I restrict access to exam link only for those who have permissions to exam via cancan ?
Reply all
Reply to author
Forward
0 new messages