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
[[ -s "$HOME/.rvm/scripts/rvm" ]] && . "$HOME/.rvm/scripts/rvm" | |
vc_dirty_marker="✘" | |
prompt_designator_symbol="»" | |
prompt_designator_alternate="…" | |
_prompt_colour() { | |
echo -n '\[' | |
if [[ "$1" = default ]]; then | |
echo -n "\\e[0m" |
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
{% block enquiry %} | |
<form id="enquiry_form" action="{{ contents.enquiries.api.create }}" method="post"> | |
{% editable_long_text 'welcome' %} | |
<h3>Got an enquiry?</h3> | |
<p>Please fill in the form below and we will get in touch as soon as possible.</p> | |
{% endeditable_long_text %} | |
<fieldset> | |
<div id="error_message">No Errors</div> | |
<ol> | |
<li> |
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 'rubygems' | |
require 'bundler/setup' | |
require 'bundler/capistrano' | |
$:.unshift(File.expand_path('./lib', ENV['rvm_path'])) # Add RVM's lib directory to the load path. | |
require "rvm/capistrano" # Load RVM's capistrano plugin. | |
set :rvm_ruby_string, 'ree-1.8.7@bluenail' # Or whatever env you want it to run in. | |
set :rvm_type, :system | |
set :user, "dk" |
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
<!DOCTYPE html> | |
<!--[if lt IE 7 ]> <html lang="en" class="no-js ie6"> <![endif]--> | |
<!--[if IE 7 ]> <html lang="en" class="no-js ie7"> <![endif]--> | |
<!--[if IE 8 ]> <html lang="en" class="no-js ie8"> <![endif]--> | |
<!--[if IE 9 ]> <html lang="en" class="no-js ie9"> <![endif]--> | |
<!--[if (gt IE 9)|!(IE)]><!--> <html lang="en" class="no-js"> <!--<![endif]--> | |
<head> | |
{% include 'head' %} | |
</head> | |
<body class="{{ page.slug }}"> |
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
something_awesome: | |
extension: mail | |
field: | |
from: contact[email] | |
recipients: info@company.com | |
<form> | |
<input name="contact[email]" /> | |
</form> |
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 Version | |
named_scope :drafts, :conditions => { :draft => true } | |
named_scope :published, :conditions => { :draft => false } | |
end | |
Version.drafts # all drafts | |
Version.published # all published |
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 Shop | |
module Models | |
module Page | |
def self.included(base) | |
base.class_eval do | |
# Returns the field with the name passed. | |
# If a second parameter is passed the field content will be updated | |
def field(name,*args) |
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 ProductPage < Page | |
cattr_accessor :allowed_children | |
@@allowed_children = [Page,ArchivePage] | |
layout 'product' | |
field 'price' | |
part 'body' |
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
// compass/_support *************************************** | |
// Usually compass hacks apply to both ie6 & 7 -- set this to false to disable support for both. | |
$legacy-support-for-ie: true !default | |
// Setting this to false will result in smaller output, but no support for ie6 | |
$legacy-support-for-ie6: $legacy-support-for-ie !default | |
// Setting this to false will result in smaller output, but no support for ie7 | |
$legacy-support-for-ie7: $legacy-support-for-ie !default |
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
desc "Export specific models to yaml" | |
task :export => :environment do | |
require 'fileutils' | |
begin | |
# Returns only the specified models, unless they're not defined | |
models = ENV['MODELS'].split(',').map { |m| m.pluralize.classify.constantize } | |
rescue | |
# Returns all models minus the subclasses of Page | |
models = (ActiveRecord::Base.send(:subclasses) - Page.send(:subclasses)).map { |m| m.name.constantize } | |
end |