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?