Skip to content

Instantly share code, notes, and snippets.

View at15's full-sized avatar
🐶
Eating

Pinglei Guo at15

🐶
Eating
View GitHub Profile
@at15
at15 / .gitattributes
Created January 30, 2016 14:07 — forked from a-r-m-i-n/.gitattributes
.gitattributes to force LF for all text files
# Autodetect text files
* text=auto
# Force the following filetypes to have unix eols, so Windows does not break them
*.* text eol=lf
# Force images/fonts to be handled as binaries
*.jpg binary
*.jpeg binary
*.gif binary
class Api::RegistrationsController < Api::BaseController
respond_to :json
def create
user = User.new(params[:user])
if user.save
render :json=> user.as_json(:auth_token=>user.authentication_token, :email=>user.email), :status=>201
return
else