RailsCasts Pro episodes are now free!

Learn more or hide this

VuongHo's Profile

GitHub User: VuongHo

Comments by

Avatar

Try it:
def data
users.map do |user|
[
link_to(user.name, user),
h(user.email),
link_to("delete", user, method: :delete, data: { confirm: 'Are you sure?' }),
"#{check_box_tag('user[]', user.id)}"
]
end
end