You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
- # frozen_string_literal: true
-
-
- module UserRepr
- BASE = { only: [:id, :name] }.freeze
-
- module_function
-
- def base user
- user.as_json(BASE)
- end
-
- def many users
- users.map { |u| base(u) }
- end
- end
|