Query On Roles and Permission:
Admin ,Carer ,Care Manager ,All are the Fixed Roles .
Role "All" conditions has a different functionality - it means to read /write should be given to everyone irrespective of other roles.
For each role can have read or write permission.
I have solved this by creating a table called Permission with fields Permission Name, section , admin , C ,CM ,All and store data 1 if "Read " and 2 if it is "Write" .
I tried with the intermediate table (HABTM) to connect role and permission .but the intermidiate table needs read and write option.
Tried with has_many :through functionality but the Role "All" functionality looks bit odd.
I would like to know is there any simpler way of achieving this ?**