My Recent Pastes (26 and counting)

Pastes by Donald Petersen (26 and counting)

Pages:

Below are the 11 most recent pasties by Donald Petersen.

June 01, 2007
1:41AM EDT
by Donald Petersen

class UsersController < ApplicationController

  make_resourceful do
    actions :all
    

June 01, 2007
1:40AM EDT
by Donald Petersen

    end

May 26, 2007
1:34AM EDT
by Donald Petersen

  def sidebar(collection, options = {}, &block)
    label = options.include?(:label) ? options[:label] : collection.first.class.to_s.pluralize

    s = sidebar_wrapper(label) do
      collection.inject("") do |buffer, item|

May 26, 2007
1:33AM EDT
by Donald Petersen

                        <% sidebar(@categories) do |category| %>
                                <%= link_to "#{category.name} ยป #{category.posts.count}", category_posts_path(category) %>
                        <% end %>
                        
                        <% sidebar(Post.recent(5), :label => 'Newest Posts') do |post| %>

May 25, 2007
4:22PM EDT
by Donald Petersen

module ModuleName
  module ClassMethods
    
  end
  

May 22, 2007
1:19AM EDT
by Donald Petersen

#require 'autotest/growl'
require 'autotest/redgreen'

module Autotest::Growl
  def self.growl title, msg, pri=0, stick=""

March 15, 2007
12:01AM EDT
by Donald Petersen

require "ftools"

Dir.new('.').each do |f|
  if(f != '.' && f != '..' && f != 'rename.rb')
    new_name = f.to_s.gsub(/\ +/, '_')

March 05, 2007
11:30PM EDT
by Donald Petersen

        @page = Page.new(params[:page])  
        content_type = @page.page_content_type
        raise unless VALID_CONTENT_TYPES.member?(content_type)
        page_content = content_type.constantize.send(:new, params[content_type.downcase])

March 05, 2007
11:29PM EDT
by Donald Petersen

        @page = Page.new(params[:page])  
        content_type = @page.page_content_type
        raise unless VALID_CONTENT_TYPES.member?(content_type)
        page_content = content_type.constantize.send(:new, params[content_type.downcase])

March 04, 2007
1:41AM EDT
by Donald Petersen

  def new
    @page = Page.new

    @group = Group.new
    @event = Event.new

March 03, 2007
3:38PM EDT
by Donald Petersen

  def new
    @gallery = Gallery.new
  end

  def edit

Previous page