Skip to content

Releases: victor-am/rails-ranger

0.4.0

20 Nov 18:15
Compare
Choose a tag to compare
  • Axios updated to 0.17.1 (PR #20)
  • Added the .resource function to access nested resources within Rails (PR #19)

Example of the .resource function usage:

api.resource('users', 1).list('blogPosts')
//=> GET request to /users/1/blog_posts

0.3.4

07 Sep 18:36
Compare
Choose a tag to compare

On this version we:

  • Added a [Rails Ranger] identifier to rails-ranger error messages
  • Fixed the missing conversion of the resource name from camelCase to snake_case

0.3.3

07 Sep 18:34
Compare
Choose a tag to compare

Added support for the injection of nested objects into the query params, such as:

    // Giving the following params
    { filters: { userId: 1 } }

    // Into a GET/DELETE request through Rails Ranger, would lead to the following URL:
    myurl.com?filters[userId]=1

0.3.2

30 Jul 01:55
Compare
Choose a tag to compare

Bugfixes

  • Fixes the bug reported on #10 which messed up with parameters given to POST, PATCH and PUT requests.

0.3.1

30 Jul 00:30
Compare
Choose a tag to compare

Bugfixes

  • RailsRanger constructor defaults are working as expected now
  • Response data transformations now take advantage of Axios defaults to handle things properly

0.3.0

29 Jul 21:39
Compare
Choose a tag to compare

Added automatic data transformation of request and response:

  • Request data like { firstName: 'John' } will be converted to { first_name: 'John' } before the request.
  • Response data like { first_name: 'John' } will be converted to { firstName: 'John' } before being handled to the user.

Also, the transformData option flag was added, to disable the behavior above if the user doesn't want it.

Separation of Rails Ranger options and Axios options

Now to pass options to Axios the user should use the axios key. For example:

new RailsRanger({ axios: { baseUrl: 'http://www.google.com' } })

0.2.2

27 Jul 04:45
Compare
Choose a tag to compare
Bump version to 0.2.2

0.2.1

27 Jul 02:14
Compare
Choose a tag to compare
Bump version to 0.2.1