I'm setting up a basic rails app and integrating angularjs into it. Authentication is handled by devise, cancan and roles are managed by rolify. I'm trying to build a user index page and show the roles for each user on the page but can't seem to get it working. jbuilder returns the info for each user but the roles aren't in there.
index.json.jbuilder
json.array!(@users) do |user|
json.id user.id
json.name user.name
json.email user.user.email
json.street user.street
json.city user.city
json.state user.state
json.zip user.zip
json.home_phone user.home_phone
json.cell_phone user.cell_phone
json.alt_email user.alt_email
json.start_year user.start_year
json.notes user.notes
json.confirmed user.confirmed
json.nickname user.nickname
end
there's nothing special about my user model, controller or index page (I'm trying to show the roles in the index entry for the user on the index page)
any help?
thanks in advance:
Max