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
Given /^there are the following users:$/ do |table| | |
table.hashes.each do |attributes| | |
unconfirmed = attributes.delete("unconfirmed") == "true" | |
admin = attributes.delete("admin") == "true" | |
@user = User.create!(attributes) | |
@user.admin = admin | |
@user.confirm! unless unconfirmed | |
end | |
end |
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
$('nav ul li a').bind('click',function(event){ | |
var $anchor = $(this); | |
$('html, body').stop().animate({ | |
scrollTop: ($($anchor.attr('href')).offset().top)-80 | |
}, 1500,'easeInOutExpo'); | |
event.preventDefault(); |
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
@badge = Badge.find_or_create_by_name_and_user_id(:name => @badge_name,:user_id => current_user.id, :date_approved => "2013-04-10", :completed_credits => 1, :status => 1, :badge_type_id => 12, :user_id => current_user.id).where("status = 1") |
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
.message { | |
@include span-columns(12); | |
font-size: 85%; | |
overflow : hidden; | |
text-overflow: ellipsis; | |
display: -webkit-box; | |
-webkit-line-clamp: 2; | |
-webkit-box-orient: vertical; | |
} |
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
require "restclient" | |
require "json" | |
media_url = "https://api.instagram.com/v1/tags/scottisla/media/recent?access_token=ACCESS_TOKEN" | |
urls = [] | |
while media_url != nil | |
response = RestClient.get(media_url) | |
json = JSON.parse(response) |
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
ActiveRecord::RecordNotUnique (PG::Error: ERROR: duplicate key value violates unique constraint "index_students_on_email" | |
2013-07-05T19:08:13.932777+00:00 app[web.1]: DETAIL: Key (email)=() already exists. |
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
sync: (method,model,options) -> | |
if method is "create" | |
options.beforeSend = (xhr) -> | |
xhr.setRequestHeader 'X-HTTP-Method-Override', 'PUT' | |
Backbone.sync(method,model,options) |
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
<div id="loading"><div id="spinner"></div> <span>Loading...</span></div> |
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
{ | |
"nickname": "LB", | |
"about_me": "I'm a cool sophomore that's in to Poggs.", | |
"answers": [{ | |
"question_id": 16, | |
"text": "Theatre, Band, volunteer at Rocketown" | |
}, { | |
"question_id": 17, | |
"text": "I love music and Bob Dylan more than anyone else." | |
}, { |
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
{ | |
"birth_name": "Lynn Braun", | |
"nickname": "LB", | |
"first_name": "Lynn", | |
"last_name": "Braun", | |
"grade": "9th Grade", | |
"school_name": "JFK High School", | |
"about_me": "I'm a cool sophomore that's in to Poggs.", | |
"name": "LB Braun", | |
"avatar_url": "https://zeumo-staging-2.s3.amazonaws.com/uploads/student/avatar/32/polaroid_avatar.jpg?1374245357", |
OlderNewer