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
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" | |
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> | |
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> | |
<head> | |
<title>untitled</title> | |
</head> |
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
/** | |
* Of course, custom_glue is the name of the module. Substitute your own module's name. | |
*/ | |
/** | |
* Preprocess the wrapping HTML. | |
* | |
* @param array &$variables | |
* Template variables. | |
*/ |
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
$tid = 1; | |
if (arg(0) == 'node' && is_numeric(arg(1))) { | |
$node = node_load(arg(1)); | |
if(array_key_exists('und', $node->field_department)) { | |
$tid = $node->field_department['und'][0]['tid']; | |
} | |
} | |
return $tid; |
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
<?php | |
$view = new view; | |
$view->name = 'userthing'; | |
$view->description = ''; | |
$view->tag = 'default'; | |
$view->base_table = 'users'; | |
$view->human_name = 'userthing'; | |
$view->core = 7; | |
$view->api_version = '3.0'; |
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
./automysqlbackup/automysqlbackup: line 835: 6: Bad file descriptor | |
./automysqlbackup/automysqlbackup: line 836: 7: Bad file descriptor |
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
Feature: Offer Notifications | |
Background: | |
Given there are the following users: | |
| email | | |
| bob@mythingy.com | | |
| alice@mythingy.com | | |
Given a clear email queue | |
And "alice@mythingy.com" has created an Offer: |
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 ApplicationController < ActionController::Base | |
protect_from_forgery | |
before_filter :find_states | |
helper_method :current_user | |
rescue_from CanCan::AccessDenied do |exception| | |
flash[:error] = exception.message | |
redirect_to root_url | |
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
module Helpers | |
def sign_in(user) | |
@user_session = UserSession.create user | |
end | |
def fill_in_autocomplete(selector, value) | |
page.execute_script %Q{$('#{selector}').val('#{value}').keydown()} | |
end | |
def choose_autocomplete(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
# A sample Guardfile | |
# More info at https://github.com/guard/guard#readme | |
guard 'spork', :test_unit => false, :cucumber => true, :rspec_env => { 'RAILS_ENV' => 'test' } do | |
watch('config/application.rb') | |
watch('config/environment.rb') | |
watch(%r{^config/environments/.+\.rb$}) | |
watch(%r{^config/initializers/.+\.rb$}) | |
watch('Gemfile') | |
watch('Gemfile.lock') |