I guess this should be simple, but I can't figure it out
I my view there is a link that I want to trigger some ajax:
link_to( "#{sir.sir_id}" , '#', :data => {'sir-id' => sir.id}, remote: true ),
In my coffeescript I can get the value of the data-attribute in the link like so:
$ ->
$("a[data-sir-id]").click ->
data_sir_id = $(this).data("sir-id")
So I need the value of that variable (data_sir_id) in my controller, so I can get its associated model objects and render them in the same view
How could I achieve that?