api: refactor only param.
This commit is contained in:
@@ -17,6 +17,8 @@ class ApplicationResponder < ActionController::Responder
|
||||
options[:root] ||= resource.table_name.dasherize if resource.respond_to?(:table_name)
|
||||
end
|
||||
|
||||
options[:only] ||= params["only"].scan(/\w+/) if params["only"]
|
||||
|
||||
super
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user