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
From f6b4095185f4aff912b3bda59033ed2d259da735 Mon Sep 17 00:00:00 2001 | |
From: John Duff <[email protected]> | |
Date: Thu, 18 Jun 2009 22:24:00 -0400 | |
Subject: [PATCH] make pass through error code configurable | |
--- | |
railties/lib/rails/rack/metal.rb | 8 ++++- | |
.../metal/multiplemetals/app/metal/metal_a.rb | 4 +- | |
.../metal/multiplemetals/app/metal/metal_b.rb | 4 +- | |
railties/test/metal_test.rb | 30 ++++++++++++++++++++ |
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 Object | |
# Useage: | |
# @user.name.or("blank") | |
# if @user's name is nil or "", returns "blank", otherwise returns the name | |
def or(value) | |
(respond_to?(:empty?) ? empty? : !self) ? value : self | |
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
var DateHelper = { | |
// Takes the format of "Jan 15, 2007 15:45:00 GMT" and converts it to a relative time | |
// Ruby strftime: %b %d, %Y %H:%M:%S GMT | |
time_ago_in_words_with_parsing: function(from) { | |
var date = new Date; | |
date.setTime(Date.parse(from)); | |
return this.time_ago_in_words(date); | |
}, | |
time_ago_in_words: function(from) { |
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
module ApplicationHelper | |
# Example Useage: | |
# <%navigation do |nav|%> | |
# <%if logged_in? %> | |
# <%=nav.item :logout%> | |
# <%=nav.item :posts, :link=>user_posts_url(current_user), | |
# :selected_if=>Proc.new {|controller| controller.controller_name.to_sym == :posts}%> | |
# <%else%> | |
# <%=nav.item :signup%> #uses the signup_url helper |
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
run "rm public/index.html" | |
git :init | |
plugin "rspec", :git => "git://github.com/dchelimsky/rspec.git", :submodule => true | |
plugin "rspec-rails", :git => "git://github.com/dchelimsky/rspec-rails.git", :submodule => true | |
plugin "exception-notifier", :git => "git://github.com/rails/exception_notification.git", :submodule => true | |
plugin "restful-authentication", :git => "git://github.com/technoweenie/restful-authentication.git", :submodule => true | |
plugin "semantic-form-builder", :git => "git://github.com/rubypond/semantic_form_builder.git", :submodule => true | |
plugin "paperclipped", :git => "git://github.com/kbingman/paperclipped.git", :submodule => tru | |
NewerOlder