spec/dummy_app/app/controllers/users_controller.rb in eitil-1.4.1 vs spec/dummy_app/app/controllers/users_controller.rb in eitil-2.0.0
- old
+ new
@@ -1,40 +1,9 @@
class UsersController < ApplicationController
before_action :set_user, only: [:show, :edit, :update, :destroy]
- # ---
- # Tests for EitilWrapper::Decorator
-
- before_action :set_user, only: [:decorator_a, :decorator_b, :decorator_c, :decorator_d]
-
- # default
- def decorator_a
- hash = decorate(@user)
- render json: hash
- end
-
- # specific dec_method
- def decorator_b
- hash = decorate(@user, dec_method: :first_and_last_name)
- render json: hash
- end
-
- # post request, with 'isWeb' and 'isMobile' params
- def decorator_c
- hash = decorate(@user)
- render json: hash
- end
-
- # specific dec_class
- def decorator_d
- hash = decorate(@user, dec_class: :Application, dec_method: :timestamps)
- render json: hash
- end
-
- # ---
-
# GET /users
def index
@users = User.all