Skip to content

Commit

Permalink
Remove useless rescue in content_for Page method
Browse files Browse the repository at this point in the history
  • Loading branch information
bricesanchez committed Jul 18, 2015
1 parent b6e6997 commit 1c6d736
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions pages/app/models/refinery/page.rb
Original file line number Diff line number Diff line change
Expand Up @@ -292,11 +292,7 @@ def to_refinery_menu_item
#
# Will return the body page part of the first page.
def content_for(part_slug)
begin
part_with_slug(part_slug).try(:body)
rescue
raise ActiveRecord::RecordNotFound
end
part_with_slug(part_slug).try(:body)
end

# Accessor method to test whether a page part
Expand Down

0 comments on commit 1c6d736

Please sign in to comment.