1
In the administrative part I’m doing my Admin can view all Subscriptions performed by users in a table (this part is working perfectly)
Code of my admin controller,
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 clicking the X button it calls a modal that should display the information of the user she chose from the table, but do not know how to specifically pass the one of each.

The data you want to display in the modal, are all on the screen or you need to search from the database?
– Alex Takitani
In the modal ta displaying just any html to do the front end. Some of the data are those of the table, but I will need to fetch others in the database
– Rodrigo Barreto
There are several ways to solve, but I do not know if the stack overflow will let it stay here, I think you better ask there in the google groups Rails-br.
– Alex Takitani