Skip to content

Instantly share code, notes, and snippets.

View patrickberkeley's full-sized avatar

Patrick Berkeley patrickberkeley

View GitHub Profile
undefined method `app' for #<CandidateMembershipForm:0x243bac8>
wrong argument type String (expected Module)
Extracted source (around line #38):
35: <% fields_for "application_form[training_experiences][]", TrainingExperience.new do |ff| %>
36: <tr>
37: <td class="label required"><%= label :type, "Type" %>
38: <td><%= ff.select(:type, TrainingExperience.types, { :include_blank => true }) %>
39: <tr>
40: <td class="label required"><%= label :location, "Location" %>
ActionView::TemplateError (xml_url failed to generate from {:type=>"article", :format=>"rss20", :action=>"feed", :controller=>"xml", :id=>#<Article id: 3, type: "Article", title: "test", author: "test", body: "test", extended: "", excerpt: nil, keywords: "test", created_at: "2008-10-02 13:12:49", updated_at: "2008-10-02 13:16:33", user_id: 1, permalink: "test", guid: "386f1c91-d432-4b92-bb6e-ac2d1dc333ee", text_filter_id: nil, whiteboard: nil, name: nil, published: true, allow_pings: true, allow_comments: true, published_at: "2008-10-02 13:11:00", state: "published">}, expected: {:type=>"sitemap", :format=>"googlesitemap", :action=>"feed", :controller=>"xml"}, diff: {:type=>"sitemap", :format=>"googlesitemap", :id=>#<Article id: 3, type: "Article", title: "test", author: "test", body: "test", extended: "", excerpt: nil, keywords: "test", created_at: "2008-10-02 13:12:49", updated_at: "2008-10-02 13:16:33", user_id: 1, permalink: "test", guid: "386f1c91-d432-4b92-bb6e-ac2d1dc333ee", text_filter_id: nil, whiteb
@patrickberkeley
patrickberkeley / pages_controller.rb
Created December 7, 2008 02:10
using Paperclip for multiple attachments and displaying them using the method described in Advanced Rails Recipe #13
class PagesController < ApplicationController
before_filter :login_required, :except => [ :show ]
# GET /pages
# GET /pages.xml
def index
@pages = Page.find(:all)
respond_to do |format|
format.html # index.html.erb
<div class="asset">
<% if asset.new_record? %>
<% fields_for "page[new_asset_attributes][]", asset do |asset_form| -%>
<p>
<%= asset_form.file_field :file %>
<%= link_to_function "remove", "$(this).up('.asset').remove()" %>
</p>
<% end -%>
<% else %>
<p>
sudo rake gems:build --trace
(in /home/p/public_html/s/releases/20081220094647)
** Invoke gems:build (first_time)
** Execute gems:build
Built gem: '/home/p/public_html/s/releases/20081220094647/vendor/gems/rspec-rails-1.1.11'
Built gem: '/home/p/public_html/s/releases/20081220094647/vendor/gems/mislav-will_paginate-2.3.6'
Built gem: '/home/p/public_html/s/releases/20081220094647/vendor/gems/capistrano-ext-1.2.1'
Built gem: '/home/p/public_html/s/releases/20081220094647/vendor/gems/rubyist-aasm-2.0.2'
Built gem: '/home/p/public_html/s/releases/20081220094647/vendor/gems/rspec-1.1.11'
rake aborted!
<%= project.images.first ? (link_to_remote (image_tag project.images.first.file.url(:thumb), :title => truncate(project.description)), :url => {:controller => :projects, :action => :change_main, :category_id => category, :project_id => project.id}, :loading => "$('category_#{category.id}_main').hide(); $('spinner').show();", :update => "category_#{category.id}_main", :complete => "$('spinner').hide(); $('category_#{category.id}_main').show(); Shadowbox.clearCache(); Shadowbox.setup();" ) : "" %>
total used free shared buffers cached
Mem: 256 251 5 0 0 20
-/+ buffers/cache: 230 25
Swap: 511 243 268