From 5c376b743e030963816090437b761acb98c9fe1a Mon Sep 17 00:00:00 2001 From: marekpolakowski Date: Wed, 28 Mar 2018 16:20:47 +0200 Subject: [PATCH] 0.4.3 version --- Gemfile.lock | 2 +- docs/CHANGELOG.md | 4 ++++ docs/CONTROLLER.md | 6 +++++- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 007d47c..62709e5 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,7 +1,7 @@ PATH remote: . specs: - resourcey (0.4.2) + resourcey (0.4.3) active_model_serializers (~> 0.10.6) activerecord (>= 4) railties (>= 4) diff --git a/docs/CHANGELOG.md b/docs/CHANGELOG.md index 6c6ad65..f149587 100644 --- a/docs/CHANGELOG.md +++ b/docs/CHANGELOG.md @@ -19,3 +19,7 @@ ### 0.4.0 - feature: allow to configure resourcey/controller superclass + +### 0.4.3 +- feature: add `collection_scope` to controller (it allows to scope resources) +- `use_model` method can receive model name, or model class diff --git a/docs/CONTROLLER.md b/docs/CONTROLLER.md index 5123c4c..7c08513 100644 --- a/docs/CONTROLLER.md +++ b/docs/CONTROLLER.md @@ -2,10 +2,14 @@ Controller (`Resourcey::Controller` class) gives you ability to perform REST actions on your resources. ## Controller model -For controller named `UsersController`, model is `User` by default (it uses `controller_name` method from the `ActionController::Base`). If you want to change model used by controller, just call `use_model` method inside, and pass model class: +For controller named `UsersController`, model is `User` by default (it uses `controller_name` method from the `ActionController::Base`). If you want to change model used by controller, just call `use_model` method inside, and pass model class or model name: ```ruby class AdminsController < Resourcey::Controller use_model User + # or + use_model :user + # or + use_model 'User' end ```