bootstrap-ruby / bootstrap-editable-rails

In-place editing with Twitter Bootstrap for Rails
http://rubygems.org/gems/bootstrap-editable-rails
MIT License
216 stars 52 forks source link

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

Open salgadobreno opened 11 years ago

salgadobreno commented 11 years ago

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
AlexEmashev commented 8 years ago

Did you find a solution for this?