My Recent Pastes (39 and counting)

Pastes by Mikel Lindsaar (39 and counting)

Pages:

Below are the 9 most recent pasties by Mikel Lindsaar.

June 03, 2007
6:49PM EDT
by Mikel Lindsaar

class VmsDocument < ActiveRecord::Base
  belongs_to :section
  validates_uniqueness_of :title, :scope => :section_id, :on => :create, :message => "must be unique"
  validates_uniqueness_of :title, :scope => :section_id, :on => :update, :message => "must be unique"
  validates_presence_of :section_id, :on => :create, :message => "can't be blank"

May 30, 2007
3:53AM EDT
by Mikel Lindsaar

def word_file_cleaner
        document = self.cleaned_document
        # Remove all the manually inserted breaks, don't need them. 
        document = document.chars.gsub(/<br>/u, '<br />')
        # Strip out all the new lines, then replace all </p> tags with </p>\n so that we 

May 30, 2007
3:52AM EDT
by Mikel Lindsaar

def word_file_cleaner
        document = self.cleaned_document
        # Remove all the manually inserted breaks, don't need them. 
        document = document.chars.gsub(/<br>/u, '<br />')
        # Strip out all the new lines, then replace all </p> tags with </p>\n so that we 

May 29, 2007
2:02AM EDT
by Mikel Lindsaar

# vms_document_controller.rb

# Snippet

def test_should_show_that_size_matches_document_size

May 28, 2007
9:54PM EDT
by Mikel Lindsaar

require "#{File.dirname(__FILE__)}/../test_helper"
require 'originals_controller'
require 'sections_controller'
require 'vms_documents_controller'

May 28, 2007
1:45AM EDT
by Mikel Lindsaar

  # original has_many :sections, :dependent => :destroy
  # sections belong_to :original
  # The destroy dependent works if I test through a browser

  def test_parent_relationship_with_section

May 28, 2007
12:42AM EDT
by Mikel Lindsaar

# Read about fixtures at http://ar.rubyonrails.org/classes/Fixtures.html

one:
  id:                     1
  title:                  "First book title"

May 27, 2007
10:58PM EDT
by Mikel Lindsaar

class RemoveUserCollumsFromOriginals < ActiveRecord::Migration
  def self.up
+ unset BASH_ENV
+ export LC_CTYPE=en_US.UTF-8
+ LC_CTYPE=en_US.UTF-8

May 27, 2007
10:51PM EDT
by Mikel Lindsaar

open -a TextMate "$TM_SUPPORT_PATH/lib/bash_init.shdate
+ unset BASH_ENV
+ export LC_CTYPE=en_US.UTF-8
+ LC_CTYPE=en_US.UTF-8
+ : /Users/mikel/Library/Application Support/TextMate/bash_init.sh

Previous page