From 9fc24a2eab1a0546f372de709bb9adfc426c0e96 Mon Sep 17 00:00:00 2001 From: Matchu Date: Mon, 15 Nov 2010 16:44:57 -0500 Subject: [PATCH] handle contribution for now-unused swf --- app/helpers/contribution_helper.rb | 14 +++++++++----- config/environments/remote_development.rb | 3 +++ 2 files changed, 12 insertions(+), 5 deletions(-) create mode 100644 config/environments/remote_development.rb diff --git a/app/helpers/contribution_helper.rb b/app/helpers/contribution_helper.rb index 9e7f417d..8720d52b 100644 --- a/app/helpers/contribution_helper.rb +++ b/app/helpers/contribution_helper.rb @@ -13,11 +13,15 @@ module ContributionHelper end def contributed_item(item, adverbial) - output do |html| - html << 'the' - html << link_to(item.name, item, :class => 'contributed-name') - html << adverbial - html << image_tag(item.thumbnail_url) + if item + output do |html| + html << 'the' + html << link_to(item.name, item, :class => 'contributed-name') + html << adverbial + html << image_tag(item.thumbnail_url) + end + else + "data for an item that has since been updated" end end diff --git a/config/environments/remote_development.rb b/config/environments/remote_development.rb new file mode 100644 index 00000000..1f690a2a --- /dev/null +++ b/config/environments/remote_development.rb @@ -0,0 +1,3 @@ +# Mirror of the development environment. Designed to allow the ability to plug +# in the production database, while still behaving like development. +require Rails.root.join('config', 'environments', 'development')