This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CREATE EXTENSION IF NOT EXISTS uuid-ossp; | |
CREATE TABLE IF NOT EXISTS users ( | |
user_id uuid PRIMARY KEY DEFAULT uuid_generate_v1mc(), | |
email text UNIQUE, | |
password_hash text, | |
username text, | |
avatar_url text | |
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
App.User = Ember.Object.extend({ | |
email: null, | |
name: { | |
first: null, | |
last: null, | |
location: null, | |
persistLogin: false, | |
roles: [] | |
}, | |
fullName: function() { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/features/step_definitions/auth_steps.rb b/features/step_definitions/auth_steps.rb | |
index aac8d15..7f79dd2 100644 | |
--- a/features/step_definitions/auth_steps.rb | |
+++ b/features/step_definitions/auth_steps.rb | |
@@ -3,5 +3,5 @@ Given /^I am not logged in$/ do | |
end | |
Given /^I have an account with email "([^"]*)"$/ do |email| | |
- User.find(:first, :conditions => {:email => email}) | |
+ User.find_by_email(email) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/features/step_definitions/auth_steps.rb b/features/step_definitions/auth_steps.rb | |
index aac8d15..7f79dd2 100644 | |
--- a/features/step_definitions/auth_steps.rb | |
+++ b/features/step_definitions/auth_steps.rb | |
@@ -3,5 +3,5 @@ Given /^I am not logged in$/ do | |
end | |
Given /^I have an account with email "([^"]*)"$/ do |email| | |
- User.find(:first, :conditions => {:email => email}) | |
+ User.find_by_email(email) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
<title>JavaScript Test</title> | |
<script src="/test/jquery.js" type="text/javascript"></script> | |
<script type="text/javascript"> | |
$(document).ready(function(){ | |
console.log("I'm JavaScript and I'm getting ready to fail but not let you know why."); | |
$.getJSON( | |
"http://127.0.0.1:3000/", | |
function(data) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
<title>JavaScript Test</title> | |
<script src="/test/jquery.js" type="text/javascript"></script> | |
<script type="text/javascript"> | |
$(document).ready(function(){ | |
$.getJSON( | |
"http://127.0.0.1:3000/", | |
function(data) { | |
alert('hello world'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
<title>JavaScript Test</title> | |
<script src="jquery.js" type="text/javascript"></script> | |
<script type="text/javascript"> | |
function init() { | |
$.getJSON( | |
"http://127.0.0.1:3000/", | |
function(data) { | |
alert('hello world'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Regexp | |
def to_proc | |
lambda {|arg| match(arg)} | |
endhttp://gist.github.com/images/modules/gist/save_button.png | |
end | |
puts /whatever/.to_proc.call(5,6) | |
# => untitled:3: warning: multiple values for a block parameter (2 for 1) |