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
# user.rb | |
class User | |
include Mongoid::Document | |
devise :database_authenticatable, :registerable, | |
:recoverable, :rememberable, :trackable, :validatable | |
field :username | |
. | |
. | |
. |
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
ShowOffYourStash::Application.routes.draw do | |
root :to => 'pages#home' | |
devise_for :users do | |
get 'dashboard' => 'users#dashboard', as: :user_root | |
get 'users/sign_up' => 'users#new' | |
get 'users/sign_in' => 'devise/sessions#new', as: :new_user_session | |
post 'users/sign_in' => 'devise/sessions#create', as: :user_session | |
get 'users/:id' => 'users#show', as: :user_profile | |
end |
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
VirtualHost configuration: | |
wildcard NameVirtualHosts and _default_ servers: | |
*:443 atlas.brandon (/Applications/MAMP/conf/apache/extra/httpd-ssl.conf:89) | |
Syntax OK |
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
/* | |
* jQuery - Singleton | |
*/ | |
var App; | |
App = { | |
awesomeLink: null, | |
ready: function() { | |
this.awesomeLink = $('#next-link'); |
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
<?php | |
// saving habtm, many associated records at a time | |
// Audit hasAndBelongsToMany User | |
// table: audits_users | |
$audit = array( | |
'Audit' => array( | |
'name' => 'My Audit', | |
'start_date' => '2012-02-10, |
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
# admin/dealers_controller.rb | |
class Admin::DealersController < Admin::BaseController | |
def new | |
@dealer = Dealer.new | |
7.times do |i| | |
@dealer.hours.build(day: i) | |
end | |
end |
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
class PagesController < HighVoltage::PagesController | |
def home | |
session[:coverage] = 10 | |
end | |
end | |
# in the view (haml) | |
= debug session.inspect |
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
@user = User.new({ | |
email: "user#{n}@7ey.es", | |
first_name: Forgery(:name).first_name, | |
last_name: Forgery(:name).last_name, | |
password: 'letmein', | |
remember_me: true, | |
}) |
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
// BCOAuthController.h | |
// | |
// BCOAuthController.h | |
// Bivy | |
// | |
// Created by Brandon Cordell on 8/1/12. | |
// Copyright (c) 2012 lead&rock. All rights reserved. | |
// | |
#import <Foundation/Foundation.h> |
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
// | |
// BCOAuthController.h | |
// Bivy | |
// | |
// Created by Brandon Cordell on 8/1/12. | |
// Copyright (c) 2012 lead&rock. All rights reserved. | |
// | |
#import <Foundation/Foundation.h> | |
#import <WebKit/WebKit.h> |