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
actually for you only need write this
@user= User.select(:attributeN, :attributeN......., attributeN) respond_to do |format| format.json { render json: @user }