Edit Record in Bootstrap Modal
Im trying to use a Bookstrap Modal in rails on edit record, but I can seem
to get the modal to scope to the current record
The static link is
<%= link_to "Weigh Out", edit_ticket_path(ticket), "data-toggle" =>
"modal", :class => 'btn btn-mini', :id => 'edit_modal_link', "data-toggle"
=> "modal" %>
I need really to call the modal on id/edit which is the ticket number but
cannot get it to link to the selected record in the table.
Any ideas?
Or render a partial but the partial must be called with the ticket
available to it is scoped correctly to the ticket we need to edit?
My partial looks like
<%= form_for @ticket, :html => { :class => 'form-horizontal' } do |f| %>
<div class="control-group">
<%= f.label :customer_name, :class => 'control-label' %>
<div class="controls">
<%= f.hidden_field :customer_id, :class => 'text_field', :id
=>"cust_id" %>
<%= f.autocomplete_field :customer_name,
autocomplete_customer_name_customers_path, :id_element =>
'#cust_id', :class => 'text_field ui-autocomplete-input' %>
</div>
Which need to render in Modal,
No comments:
Post a Comment