In the administrative part that I'm doing, my Admin can see all Subscriptions made by users in a table (this part is working perfectly)
My admin controller's code,
def index
@subs = Subscription.all
end
Table display code
table.table#table-admin
thead
tr
th CPF
th Cód
th Endereço
th Data
th Tipo
th Status
th Do
tbody
- @subs.each do |subs|
tr
td = subs.user.cpf
td = subs.realty.realty_code
td = subs.realty.address.street + " , " + subs.realty.address.number
td = subs.created_at.strftime("%d %b, %Y")
td = subs.realty.listings.first.translated_listing_type
td = subs.translated_status
td
button data-toggle="modal" data-target="#info" X
When I click the X button it calls a modal that should display the user information that it chose from the table, but I do not know how to specifically pass the information of each one.