My Recent Pastes (39 and counting)
Pastes by Duane Johnson (39 and counting)
Below are the 9 most recent pasties by Duane Johnson.
August 26, 2007
11:51PM EDT
by Duane Johnson
View all 6 lines
desc "Run a specific spec with TASK=xxxx"
Spec::Rake::SpecTask.new('spec') do |t|
t.spec_opts = ["--format", "specdoc", "--colour"]
t.libs = ['lib', 'server/lib' ]
t.spec_files = ["specs/merb/merb_#{ENV['TASK']}_spec.rb"]
August 04, 2007
5:53PM EDT
by Duane Johnson
View all 13 lines
Merb::Router.prepare do |r| # restfull routes # r.resources :posts r.add '/admin/users/:action/:id', :controller => 'admin/users', :action => 'index', :id => nil
November 15, 2006
12:14PM EDT
by Duane Johnson
View
Includes file attachment.
<script type="text/javascript" charset="utf-8"> window.location = "<%= publish_url(:action => "approve") %>"; </script>
November 14, 2006
8:07PM EDT
by Duane Johnson
View all
96 lines
Includes file attachment.
def new
@photo = Photo.new(params[:photo])
end
# Create a new Photo. e.g. [POST] /gallery/photos
November 14, 2006
8:05PM EDT
by Duane Johnson
View all
16 lines
Includes file attachment.
['new_photo', 'edit_photo', 'photo', 'photos'].each do |prefix|
define_method "#{prefix}_url" do |options|
options ||= {}
if params[:content_id]
options.merge! :content_id => params[:content_id]
November 14, 2006
8:02PM EDT
by Duane Johnson
View all
16 lines
Includes file attachment.
# RESTful resources map.resources :sales, :controller => "sales/imemorybook", :path_prefix => "" map.resources :books, :controller => "bookshelf/books", :path_prefix => "/bookshelf" map.resources :pages, :controller => "bookshelf/pages", :path_prefix => "/bookshelf" map.resources :sections, :controller => "bookshelf/sections", :path_prefix => "/bookshelf"
November 13, 2006
3:56PM EDT
by Duane Johnson
View all
65 lines
Includes file attachment.
# Basically, I just need the following code integrated so that we can optionally pass RakeMate # some parameters (rather than calling it directly and assuming that the current file is active) # # It would also be nice if we could use my method of inheriting the PATH from the environment so # that Rails users wouldn't have to set TM_RAKE.
November 08, 2006
6:10PM EDT
by Duane Johnson
View
Includes file attachment.
file.puts "\\setupindenting[#{@book.style.paragraph_indenting+(@book.style.paragraph_indenting=='none'?'':',first')}]"
file.puts "\\setupwhitespace[#{@book.style.paragraph_spacing}]"
October 31, 2006
7:34PM EDT
by Duane Johnson
View
Includes file attachment.
<% content_for :left do %> <%= render :partial => 'side_menu' %> <% end %>
