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 Tom | |
attr_accessor :handle | |
def initialize | |
@handle = "tomcocca" | |
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
def update | |
@page = Page.find(params[:id[) | |
enforce_update_permission(@page) do | |
flash[:error] = "You can only edit your own pages" | |
redirect_to page_path(@page) | |
return | |
end | |
update! | |
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
# adapted from: http://github.com/railsmachine/shadow_puppet/blob/master/lib/shadow_puppet/core_ext.rb | |
require 'active_support/core_ext/class/attribute_accessors' | |
require 'active_support/core_ext/array' | |
require 'active_support/inflector' | |
require 'active_support/core_ext/class/inheritable_attributes' | |
require 'active_support/core_ext/duplicable' | |
class Hash #:nodoc: | |
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
# Tom's standard rails template | |
# Application Gems | |
gem "formtastic", :version => '>= 0.9.7' | |
gem 'will_paginate', :version => '~> 2.3.11' | |
gem "acts-as-taggable-on", :version => '>= 1.1.6' | |
gem "paperclip", :version => '>= 2.3.1.1' | |
gem "friendly_id", :version => '>= 2.3.2' | |
gem "inherited_resources", :version => '>= 1.1.0' | |
gem "thinking-sphinx", :lib => 'thinking_sphinx', :version => '>= 1.3.6' |
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
Factory.define :application do |factory| | |
factory.attachment(:sample, "public/samples/sample.doc", "application/msword") | |
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
Upgrade System: | |
sudo apt-get update | |
sudo apt-get dist-upgrade | |
Standard Packages: | |
sudo apt-get install build-essential | |
Eye Candy: |
NewerOlder