I'm rather new to Ruby on Rails so would appreciate some help
Roles have Users in my application. When showing a role I would like to render a paginated list of user names (and as a further refactor - links to users). Currently my HAML template is as follows
...
%ul.assigned-users
- if @role.users.present?
- names = @role.users.collect {|u| u.name}
- links = Kaminari.paginate_array(names).page(params[:page]).per(20)
= paginate links
- else
%p No users have this role assigned
...
Rendering it gives me the pagination links BUT no names.