FridayHug.com http://fridayhug.com
The Smallest Rails App http://thesmallestrailsapp.com
%w(action_controller/railtie coderay).each &method(:require)
{ | |
"window.zoomLevel": -1, | |
"editor.fontFamily": "Operator Mono, Menlo, Monaco, 'Courier New', monospace", | |
"editor.fontSize": 29, | |
"editor.lineHeight": 40, | |
"editor.letterSpacing": 0.5, | |
"workbench.editor.tabSizing": "shrink", | |
"eslint.autoFixOnSave": true, | |
"eslint.alwaysShowStatus": true, | |
"html.format.enable": true, |
{ | |
// http://eslint.org/docs/rules/ | |
"ecmaFeatures": { | |
"binaryLiterals": false, // enable binary literals | |
"blockBindings": false, // enable let and const (aka block bindings) | |
"defaultParams": false, // enable default function parameters | |
"forOf": false, // enable for-of loops | |
"generators": false, // enable generators | |
"objectLiteralComputedProperties": false, // enable computed object literal property names |
var mediaJSON = { "categories" : [ { "name" : "Movies", | |
"videos" : [ | |
{ "description" : "Big Buck Bunny tells the story of a giant rabbit with a heart bigger than himself. When one sunny day three rodents rudely harass him, something snaps... and the rabbit ain't no bunny anymore! In the typical cartoon tradition he prepares the nasty rodents a comical revenge.\n\nLicensed under the Creative Commons Attribution license\nhttp://www.bigbuckbunny.org", | |
"sources" : [ "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4" ], | |
"subtitle" : "By Blender Foundation", | |
"thumb" : "images/BigBuckBunny.jpg", | |
"title" : "Big Buck Bunny" | |
}, | |
{ "description" : "The first Blender Open Movie from 2006", | |
"sources" : [ "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/ElephantsDream.mp4" ], |
FridayHug.com http://fridayhug.com
The Smallest Rails App http://thesmallestrailsapp.com
%w(action_controller/railtie coderay).each &method(:require)
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 |