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 %>

>
> >

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?

On 4 May 2016 at 18:47, Elton S. [email protected]
wrote:

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