Skip to content

Commit

Permalink
Remove unnecessary rescues.
Browse files Browse the repository at this point in the history
  • Loading branch information
james cook committed Jun 18, 2011
1 parent 1336136 commit 65ae050
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion core/lib/refinery/application_controller.rb
Expand Up @@ -31,7 +31,7 @@ def self.included(c) # Extend controller
:show_welcome_page?

c.send :after_filter, :store_current_location!,
:if => Proc.new {|c| c.send(:refinery_user?) rescue false }
:if => Proc.new {|c| c.send(:refinery_user?) }

if Refinery.rescue_not_found
c.send :rescue_from, ActiveRecord::RecordNotFound,
Expand Down
6 changes: 5 additions & 1 deletion core/lib/refinery/helpers/meta_helper.rb
Expand Up @@ -40,7 +40,11 @@ def page_title(options = {})
when "text"
obj.custom_title
when "image"
image_fu(obj.custom_title_image, nil, {:alt => obj.title}) rescue obj.title
if obj.custom_title_image.present?
image_fu(obj.custom_title_image, nil, {:alt => obj.title})
else
obj.title
end
else
obj.title
end
Expand Down
@@ -1,6 +1,6 @@
<div id='recent_activity'>
<h2><%= t('.latest_activity') %></h2>
<% if (activity = @recent_activity.collect{|a| activity_message_for(a) rescue ''}.reject(&:blank?)).present? %>
<% if (activity = @recent_activity.collect{|a| activity_message_for(a)}.reject(&:blank?)).present? %>
<ul class='clickable'>
<% activity.each do |message| %>
<li class='<%= cycle("on", "on-hover", :name => 'recent_activity_cycle') %>'>
Expand Down

0 comments on commit 65ae050

Please sign in to comment.