i want to acces table data in my controller's def . below is my html code with table in which i am dynamically filling data and that data i want to use in my controller def
'''
<div class="row">
<div class="col-40" style="margin-left: 20px;margin-top: -6px" ><input type="text" class="form-control" id="name" placeholder="Name"></div>
<div class="col-40" style="margin-left: 20px">
<input id="date" placeholder="Date">
<script>
$('#date').datepicker({
uiLibrary: 'bootstrap4'
});
</script>
</div>
<div class="col-20" style="margin-left: 20px;margin-top: 0px" ><input type="button" class="add-row btn btn-success" value="Add Row"></div>
</div>
<input type="submit" class="btn btn-primary" name="Done" />
<table id="table" name="table">
<thead>
<tr>
<th>Select</th>
<th>Holiday Name</th>
<th>Date</th>
</tr>
</thead>
<tbody>
<tr>
<td>aaa</td>
<td>aasd</td>
</tr>
</tbody>
</table>
<% end %>
'''
''' def read data = params[:table] end '''
Aucun commentaire:
Enregistrer un commentaire