Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or 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
import pprint | |
import requests | |
# put in your api key below | |
api_key = "" | |
pp = pprint.PrettyPrinter(indent=4) | |
urlname = "ny-tech" | |
event_id = 3428886 | |
url = "https://api.meetup.com/{}/events/{}/rsvps?key={}".format(urlname, event_id, api_key) |
This file contains hidden or 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
2.1.3 :001 > Problem.find(1).problem_template | |
Problem Load (0.2ms) SELECT "problems".* FROM "problems" WHERE "problems"."id" = ? LIMIT 1 [["id", 1]] | |
ProblemTemplate Load (0.2ms) SELECT "problem_templates".* FROM "problem_templates" WHERE "problem_templates"."problem_id" = ? LIMIT 1 [["problem_id", 1]] |
This file contains hidden or 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/views/layouts/application.html.erb | |
<!DOCTYPE html> | |
<html> | |
<head> | |
<%= | |
if current_user.admin? | |
puts '<link href="/assets/application-admin.css"/>' | |
else | |
puts '<link href="/assets/application-nonadmin.css"/>' |
This file contains hidden or 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/views/layouts/application.html.erb | |
<!DOCTYPE html> | |
<html> | |
<head> | |
<%= | |
if current_user.admin? | |
stylesheet_link_tag "application-admin" | |
else | |
stylesheet_link_tag "application-nonadmin" |