Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: af700cbb0b
Fetching contributors…

Cannot retrieve contributors at this time

15 lines (12 sloc) 0.312 kb
class AccountsController < ApplicationController
def index
@accounts = Account.find :all
end
def show
@account = Account.find(params[:id])
end
def filter
accounts = Account.select('id, username').where ["username LIKE ?", "%#{params[:query]}%"]
render :json => accounts
end
end
Jump to Line
Something went wrong with that request. Please try again.