Skip to content

Instantly share code, notes, and snippets.

View abigoroth's full-sized avatar
🎯
Focusing

Ahmad Ya'kob Ubaidullah abigoroth

🎯
Focusing
View GitHub Profile
@abigoroth
abigoroth / terminal
Created May 24, 2012 08:46
error bila create subdomain
Started POST "/api/hosts" for 127.0.0.1 at 2012-05-24 16:42:26 +0800
Processing by Api::HostsController#create as JSON
Parameters: {"subdomain"=>"oh", "domain"=>"aik.com", "service"=>"4", "domain_id"=>"aik.com", "host"=>{"domain"=>"aik.com", "subdomain"=>"oh", "service"=>"4"}}
User Load (0.3ms) SELECT `users`.* FROM `users` WHERE `users`.`id` = 3 LIMIT 1
(0.1ms) BEGIN
Host Load (0.2ms) SELECT `hosts`.* FROM `hosts` WHERE `hosts`.`reference1` = 'aik.com' LIMIT 1
CACHE (0.0ms) SELECT `hosts`.* FROM `hosts` WHERE `hosts`.`reference1` = 'aik.com' LIMIT 1
CACHE (0.0ms) SELECT `hosts`.* FROM `hosts` WHERE `hosts`.`reference1` = 'aik.com' LIMIT 1
CACHE (0.0ms) SELECT `hosts`.* FROM `hosts` WHERE `hosts`.`reference1` = 'aik.com' LIMIT 1
oh.aik.com
@abigoroth
abigoroth / gist:2643597
Created May 9, 2012 10:25
backbone update attributes return 204 instead of 422
#in my controller
def update
user = current_user.update_attributes(params[:user])
respond_with user
end
#in my backbone view
@model.url = '/api/users'
class Dnscell.Collections.Domains extends Backbone.Collection
url: "/api/zones"
model: Dnscell.Models.Domain