I want to select only specific attributes from a model(id,name).
The SQL-command can be for example:
SELECT id,name,username FROM Users
Do you know h
You can also pass in an array, like so:
Model.all.select ['id', 'title']
In mongoid, that would be:
User.only(:name, :username).where(id: params[:id]).first