mirror of
https://github.com/ditkrg/active_model_serializers.git
synced 2026-01-22 22:06:50 +00:00
Merge pull request #2046 from leonelgalan/bug_filter_parameters
Fixes bug in Test::Schema when using filter_parameters
This commit is contained in:
commit
81a9fbd1c3
@ -60,11 +60,11 @@ module ActiveModelSerializers
|
|||||||
attr_reader :document_store
|
attr_reader :document_store
|
||||||
|
|
||||||
def controller_path
|
def controller_path
|
||||||
request.filtered_parameters[:controller]
|
request.filtered_parameters.with_indifferent_access[:controller]
|
||||||
end
|
end
|
||||||
|
|
||||||
def action
|
def action
|
||||||
request.filtered_parameters[:action]
|
request.filtered_parameters.with_indifferent_access[:action]
|
||||||
end
|
end
|
||||||
|
|
||||||
def schema_directory
|
def schema_directory
|
||||||
|
|||||||
@ -6,6 +6,8 @@ module ActiveModelSerializers
|
|||||||
config.active_support.test_order = :random
|
config.active_support.test_order = :random
|
||||||
config.action_controller.perform_caching = true
|
config.action_controller.perform_caching = true
|
||||||
config.action_controller.cache_store = :memory_store
|
config.action_controller.cache_store = :memory_store
|
||||||
|
|
||||||
|
config.filter_parameters += [:password]
|
||||||
end
|
end
|
||||||
|
|
||||||
app.routes.default_url_options = { host: 'example.com' }
|
app.routes.default_url_options = { host: 'example.com' }
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user