bootstrap-editable-rails icon indicating copy to clipboard operation
bootstrap-editable-rails copied to clipboard

No way to define a 'url' and then just provide the 'pk'/'id'?

Open salgadobreno opened this issue 12 years ago • 1 comments

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

salgadobreno avatar Jun 25 '13 13:06 salgadobreno

Did you find a solution for this?

AlexEmashev avatar Feb 08 '16 13:02 AlexEmashev