victor-am / rails-ranger

🤠 An opinionated AJAX client for Ruby on Rails APIs
https://victor-am.github.io/rails-ranger/
MIT License
32 stars 5 forks source link

Add support for custom actions #8

Closed victor-am closed 7 years ago

victor-am commented 7 years ago

Description

This PR adds support for custom actions (like blog_posts/1/publish, and etc). The interface I thought for now was something like:

const publish = { action: 'publish', on: 'member', method: 'get' }
api.do(publish, 'blog_posts', { id: 1 })

Closes #3

sourcelevel-bot[bot] commented 7 years ago

Ebert has finished reviewing this Pull Request and has found:

You can see more details about this review at https://ebertapp.io/github/victor-am/rails-ranger/pulls/8.

victor-am commented 7 years ago

Closed until further consideration on a more pleasant API