Users assigned role Corporate are supposed to be able to access their
own company show. Its getting blocked.
Admin can access fine, so can user role Corporate as long as the
condition of the company doesn't exist. So the issue is most likely to
do with the association between a corporate user and its company not
being recognized.
this doesn't work: allow :corporate, :of => :company
here is how I'm assigning it in the User controller:
if @user.role == "Corporate"
@user.has_role!(:corporate, @company)
end
You can see all the code here:
http://pastie.org/672733