source 'http://rubygems.org'
gem "rails"
gem "mysql2"
gem "capistrano"
<style type="tex/css"> | |
body { display:none } | |
</style> | |
<!-- Include jQuery --> | |
<script type="text/javascript"> | |
$(document).ready(function() { | |
$("body").fadeIn(500); | |
$("a").click(function(event){ |
(function($){ | |
$(function() { | |
var userAgent = navigator.userAgent.toLowerCase(); | |
jQuery.browser = { | |
chrome: /chrome/.test( userAgent ), | |
safari: /webkit/.test( userAgent ) && !/chrome/.test( userAgent ), | |
opera: /opera/.test( userAgent ), | |
msie: /msie/.test( userAgent ) && !/opera/.test( userAgent ), | |
mozilla: /mozilla/.test( userAgent ) && !/(compatible|webkit)/.test( userAgent ) | |
}; |
source 'http://rubygems.org'
gem "rails"
gem "mysql2"
gem "capistrano"
(function($){ | |
$.fn.confirm = function(params){ | |
if($(this).length){ | |
elem = $(this); | |
open = false; | |
elem.submit(function() { | |
valid = $(".global-form.confirm").valid(); |
$("input[type=text]").each(function(){ | |
var curr_value = $(this).val(); | |
$(this).focus(function(){ | |
if($(this).val() == curr_value) { | |
$(this).val('').removeClass("placeholders"); | |
} | |
}); | |
$(this).blur(function(){ | |
if($(this).val() == '') { | |
$(this).val(curr_value).addClass("placeholders"); |
def generate_permalink | |
self.permalink = self.title.downcase.gsub(/[^a-z0-9]/, "-") | |
end |
ActionController::Base.asset_host = Proc.new { |source| | |
img = %w(.png .jpg .gif .jpeg) | |
ext = File.extname(source).split("?")[0] | |
if img.include?(ext) | |
"http://assets1.example.com" | |
elsif ext == '.js' | |
"http://assets2.example.com" | |
elsif ext == '.css' | |
"http://assets3.example.com" |
source "http://rubygems.org" | |
# Rails | |
gem "rails", "3.1.0.beta1" | |
# Database | |
gem "mysql2" | |
gem "memcache-client" | |
# Front End |
ruby-1.9.2-p290 :001 > Post.new | |
NoMethodError: You have a nil object when you didn't expect it! | |
You might have expected an instance of Array. | |
The error occurred while evaluating nil.[] | |
from /Users/ChristopherHein/.rvm/gems/ruby-1.9.2-p290@chrishein/gems/activerecord-3.1.0/lib/active_record/base.rb:717:in `column_defaults' | |
from /Users/ChristopherHein/.rvm/gems/ruby-1.9.2-p290@chrishein/gems/activerecord-3.1.0/lib/active_record/persistence.rb:327:in `attributes_from_column_definition' | |
from /Users/ChristopherHein/.rvm/gems/ruby-1.9.2-p290@chrishein/gems/activerecord-3.1.0/lib/active_record/locking/optimistic.rb:69:in `attributes_from_column_definition' | |
from /Users/ChristopherHein/.rvm/gems/ruby-1.9.2-p290@chrishein/gems/activerecord-3.1.0/lib/active_record/base.rb:1544:in `initialize' | |
from (irb):1:in `new' | |
from (irb):1 |
# Setup Spork | |
guard 'spork', bundler: true, cucumber_env: { 'RAILS_ENV' => 'test' }, rspec_env: { 'RAILS_ENV' => 'test' }, test_unit_env: { 'RAILS_ENV' => 'test' }, wait: 60 do | |
watch('config/application.rb') | |
watch('config/environment.rb') | |
watch(%r{^config/environments/.+\.rb$}) | |
watch(%r{^config/initializers/.+\.rb$}) | |
watch(%r{^spec/support/.+\.rb$}) | |
watch('spec/spec_helper.rb') | |
watch('test/test_helper.rb') | |
watch(%r{^features/support/.+\.rb$}) |