layout | title | description | tags | ||
---|---|---|---|---|---|
default |
SQL Style Guide |
A guide to writing clean, clear, and consistent SQL. |
|
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 Child < ActiveRecord::Base | |
belongs_to :parent | |
has_many :leaves, :as => :branch | |
def route_parts | |
[parent, self] | |
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 UuidPrimaryKey < ActiveRecord::Migration | |
def up | |
execute 'CREATE EXTENSION IF NOT EXISTS "uuid-ossp";' | |
create_table :your_table, :id => false do |t| | |
# etc... | |
t.timestamps | |
end | |
execute 'ALTER TABLE your_table ADD COLUMN id uuid DEFAULT uuid_generate_v4() PRIMARY 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
module ApplicationHelper | |
def force_vertical_center(opts={}) | |
raise ArgumentError, "Missing block" unless block_given? | |
capture_haml do | |
haml_tag '.vertical-center', opts do | |
haml_tag '.inner', &Proc.new | |
end | |
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
armakuni.ext.careers | |
arrowsgroup.com | |
bridgenoble.com | |
colstonconsulting.co.uk | |
dawsonhill.co.uk | |
esynergy-solutions.co.uk | |
exploreltd.com | |
frasermarsh.com | |
hydrogengroup.com | |
initi8recruitment.com |
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 Admin::SpacesController < AdminController | |
def preview | |
space = Space.find(params[:id]) | |
prepend_view_path 'app/views/spaces' # Ensures our `:template` is found. | |
lookup_context.prefixes = ['spaces', 'application'] # Ensures that our templates partials are pulled from the right places. | |
render template: 'show', layout: 'application', locals: { space: space } | |
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
require 'redcarpet' | |
module Handlers | |
module Markdown | |
class HTMLWithPants < Redcarpet::Render::HTML | |
include Redcarpet::Render::SmartyPants | |
end | |
def self.call(template) | |
escaped_source = template.source.gsub('"', '\"') |
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
diff --git a/db/seeds.rb b/db/seeds.rb | |
index 127561c..2ec12b2 100644 | |
--- a/db/seeds.rb | |
+++ b/db/seeds.rb | |
@@ -653,6 +653,12 @@ if activities.options.blank? | |
]) | |
end | |
+likert_0 = LikertOption.find_or_create_by(value: 0) | |
+likert_1 = LikertOption.find_or_create_by(value: 1) |
I hereby claim:
- I am clowder on github.
- I am therealclowder (https://keybase.io/therealclowder) on keybase.
- I have a public key whose fingerprint is 801C A02A E768 FCAD 5621 3C5A CF62 2202 E67E 2FC4
To claim this, I am signing this object:
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
[sqlfluff] | |
dialect = postgres | |
templater = raw | |
[sqlfluff:rules] | |
tab_space_size = 2 | |
max_line_length = 100 | |
[sqlfluff:rules:L010] | |
# Keywords |
OlderNewer