Skip to content

Instantly share code, notes, and snippets.

@Rosa-Fox
Rosa-Fox / gist:f9afba2cf4bf6cc7a5b4
Created June 20, 2014 16:02
Even worse example
%nav.navbar.navbar-default
.container-fluid
.navbar-header
%span.navbar-brand
=link_to 'Users', admin_users_path
|
=link_to 'Invitations', admin_invitations_path
.collapse.navbar-collapse
.navbar-right
= link_to 'Log out', admin_session_path, method: 'delete', class: 'btn btn-sm btn-default navbar-btn'
@Rosa-Fox
Rosa-Fox / gist:3c14bf679e884449ed52
Created June 22, 2014 18:16
Codebar Brighton Signup Information
Hi everyone,
The way to sign up to come to sessions has changed. The registrations for Codebar Brighton have been integrated into the main Codebar.io website so that each time we have a session you will get an email invite with the session details, you then just need to click 'attending' if you are able to attend.
This will make things a lot easier because we won't need to make a new ti.to page for each session and you won't need to enter your details to sign up each time. It also means coaches can be easily displayed on the main site http://www.codebar.io/coaches to give some recognition :)
It does however mean you will need to spend a few minutes signing up on www.codebar.io, but you will only need to do this once. You can go back in and edit your details afterwards if you need to.
To sign up to Codebar you will need a Github account.
@Rosa-Fox
Rosa-Fox / gist:cccb4060f0919ab1276e
Created June 22, 2014 18:19
How to receive invites to Codebar Brighton

Hi everyone,

The way to sign up to come to sessions has changed. The registrations for Codebar Brighton have been integrated into the main Codebar.io website so that each time we have a session you will get an email invite with the session details, you then just need to click 'attending' if you are able to attend.

This will make things a lot easier because we won't need to make a new ti.to page for each session and you won't need to enter your details to sign up each time. It also means coaches can be easily displayed on the main site http://www.codebar.io/coaches to give some recognition :)

It does however mean you will need to spend a few minutes signing up on www.codebar.io, but you will only need to do this once. You can go back in and edit your details afterwards if you need to.

To sign up to Codebar you will need a Github account.

FactoryGirl.define do
factory :invitation do
sequence(:id) { |n| n }
created_at "2014-06-24 10:45:28"
updated_at nil
email { |n| "person#{n}@example.com" }
workshop_ids ["http-fundamentals", "rails-security"]
token "alQmOQUU5WmGgayFZzbGKg"
redeemed_at nil
user_id nil
describe '#redeem_by(user)' do
let(:access_contain_user_and_workshop_id) { Access.exists?(user_id: n, workshop_id: ["http-fundamentals", "rails-security"]) }
before do
@invitation = Factory.create(:invitation)
@user = Factory.create(:user)
@invitation.redeem_by(@user)
end
%nav.navbar.navbar-default
.container-fluid
.navbar-header
%span.navbar-brand
=link_to 'Users', admin_users_path
|
=link_to 'Invitations', admin_invitations_path
.collapse.navbar-collapse
.navbar-right
= link_to 'Log out', admin_session_path, method: 'delete', class: 'btn btn-sm btn-default navbar-btn'
require 'sinatra'
require 'data_mapper'
load 'datamapper_setup.rb'
class Todo
include DataMapper::Resource
property :id, Serial # An auto-increment integer key
property :title, String
property :description,String
<div class="todo">
<div class="panel panel-default">
<div class="container">
<div class="panel-body">
<h2><%= @todo.id %>: <%= @todo.title %></h2>
<h4>More Info: <%= @todo.description %></h4>
<div class="row">
<div class ="col-md-1">
<a href="/todo" class="btn btn-default">Back</a>
<a href="/todo/<%= @todo.id %>/edit" class="btn btn-info">Edit</a>
@Rosa-Fox
Rosa-Fox / gist:25f48f1afceed5ac701c
Created June 5, 2015 15:12
server.rb the second
require 'sinatra'
require 'data_mapper'
load 'datamapper_setup.rb'
class Todo
include DataMapper::Resource
property :id, Serial # An auto-increment integer key
property :title, String
property :description,String
@Rosa-Fox
Rosa-Fox / gist:618d7fc11356fda290a9
Created June 5, 2015 15:12
show.erb the second
<div class="todo">
<div class="panel panel-default">
<div class="container">
<div class="panel-body">
<h2><%= @todo.id %>: <%= @todo.title %></h2>
<h4>More Info: <%= @todo.description %></h4>
<div class="row">
<div class ="col-md-1">
<a href="/todo" class="btn btn-default">Back</a>
<a href="/todo/<%= @todo.id %>/edit" class="btn btn-info">Edit</a>