Open modal on click in show details with rails

How can do this?

<%= link_to “Details”, refin_details_refin_path(@refin), ‘data-toggle’ => ‘modal’, ‘data-target’ => ‘#modal-show-refin’, :remote => true %>

×

Details of refin

routes.rb

resources :refinancings do
get ‘details_refin’
end

refinancings_controller.rb

def details_refin
@refin = Refinancing.find(params[:refinancing_id])
end

I receive this error:

No route matches {:action=>“details_refin”, :controller=>“refinancings”, :refinancing_id=>nil} missing required keys: [:refinancing_id]

I have too this:

details_refin.js.erb

$(".modal-body").empty();
$(’.modal-body’).html(’#{escape_javascript(render ‘details_refin’)}’);
$("#modal-show-refin").modal(‘show’);

Somebody can help me, please?

How can do this?

<%= link_to "Details", refin_details_refin_path(@refin), 'data-toggle' =>

What is in @refin? Is it possible that it is nil?

Colin