mirror of
https://github.com/ditkrg/active_model_serializers.git
synced 2026-01-22 22:06:50 +00:00
Rails5 requires x_action
This commit is contained in:
parent
c56d49f26b
commit
6588dee22c
@ -12,7 +12,7 @@ class DefaultScopeNameTest < ActionController::TestCase
|
|||||||
class UserTestController < ActionController::Base
|
class UserTestController < ActionController::Base
|
||||||
protect_from_forgery
|
protect_from_forgery
|
||||||
|
|
||||||
before_filter { request.format = :json }
|
before_action { request.format = :json }
|
||||||
|
|
||||||
def current_user
|
def current_user
|
||||||
User.new(id: 1, name: 'Pete', admin: false)
|
User.new(id: 1, name: 'Pete', admin: false)
|
||||||
@ -43,7 +43,7 @@ class SerializationScopeNameTest < ActionController::TestCase
|
|||||||
protect_from_forgery
|
protect_from_forgery
|
||||||
|
|
||||||
serialization_scope :current_admin
|
serialization_scope :current_admin
|
||||||
before_filter { request.format = :json }
|
before_action { request.format = :json }
|
||||||
|
|
||||||
def current_admin
|
def current_admin
|
||||||
User.new(id: 2, name: 'Bob', admin: true)
|
User.new(id: 2, name: 'Bob', admin: true)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user