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
Naomi: dinner | |
au gratin potatoes, meatloaf with mashed potatoes, or spaghetti with meatballs | |
Sent at 10:24 AM on Monday | |
me: hmmm | |
good options | |
meatloaf with meatballs au gratin | |
seriously though, meatloaf sounds awesome | |
Sent at 7:00 PM on Wednesday | |
me: heh, I like that we've started doing alt content |
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
manufacturer_specs = [{name: "width", value: "10"}] | |
hash = {name: "product name", manufacturer_specs: manufacturer_specs} | |
product_hashes = [hash] | |
Product.collection.insert(product_hashes) |
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
development: | |
# Configure available database sessions. (required) | |
sessions: | |
# Defines the default session. (required) | |
default: | |
# Defines the name of the default database that Mongoid can connect to. | |
# (required). | |
database: the_guide_development | |
# Provides the hosts the default session can connect to. Must be an array | |
# of host:port pairs. (required) |
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
development: | |
# Configure available database sessions. (required) | |
sessions: | |
# Defines the default session. (required) | |
default: | |
# Defines the name of the default database that Mongoid can connect to. | |
# (required). | |
database: the_guide_development | |
# Provides the hosts the default session can connect to. Must be an array | |
# of host:port pairs. (required) |
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
development: | |
# Configure available database sessions. (required) | |
sessions: | |
# Defines the default session. (required) | |
default: | |
# Defines the name of the default database that Mongoid can connect to. | |
# (required). | |
database: the_guide_development | |
# Provides the hosts the default session can connect to. Must be an array | |
# of host:port pairs. (required) |
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
<table> | |
<tr> | |
<td>outer</td> | |
</tr> | |
<tbody> | |
<tr> | |
<td>outer</td> | |
</tr> | |
<tr> | |
<td> |
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
whatever is in a content_part called "<whatever is in part='stuff'> Header" | |
display_name_from_part | |
display_name | |
whatever is inside part="foobar" | |
hard-coded "Section" |
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 Mongoid | |
module Sluggable | |
def self.included(klass) | |
klass.field :slug, type: String, default: "" | |
klass.before_validation :generate_slug | |
klass.after_save :add_slug_history | |
klass.validates :slug, presence: true | |
klass.validate :slug_uniqueness | |
klass.validate :slug_history_path |
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 "spec_helper" | |
describe Mongoid::Sluggable do | |
[:article, :brand, :author, :product].each do |subject| | |
describe subject.to_s.camelcase do | |
before(:each) do | |
@klass = subject.to_s.camelcase.constantize |
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 'gosu' | |
class GameWindow < Gosu::Window | |
def initialize | |
super 1280, 800, false | |
self.caption = "neato game" | |
end | |
def draw | |
# drawing stuff |
OlderNewer