Skip to content

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

@salgadobreno

Description

@salgadobreno

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions