bootstrap-editable-rails
bootstrap-editable-rails copied to clipboard
No way to define a 'url' and then just provide the 'pk'/'id'?
I'd like to be able to keep the code markup cleaner and DRYier and in some cases where I have a collection of editable stuff, it seems from 'bootstrap-editable-rails.js' that I cannot define the endpoint to then just set the id of the record and have it appended to the endpoint to create the url, I've also tried it in code... am I missing something or is it in fact the way it works now?
e.g.:
$('.editable').editable(function(){
url:'<% posts_path %>',
resource:'post'
})
<span class="editable" data-pk="1" data-name="title">Title</span>
# PUT /posts/1
Did you find a solution for this?