12 lines
242 B
Ruby
12 lines
242 B
Ruby
|
class GithubUsersController < ApplicationController
|
||
|
def index
|
||
|
@users = GithubUser.all
|
||
|
render json: @users.to_json
|
||
|
end
|
||
|
|
||
|
def show
|
||
|
@user = GithubUser.find_by_username(params[:username])
|
||
|
render json: @user.to_json
|
||
|
end
|
||
|
end
|