features/support/paths.rb in refinerycms-news-1.0 vs features/support/paths.rb in refinerycms-news-1.0.1
- old
+ new
@@ -9,10 +9,10 @@
admin_news_items_path
when /the new news item form/
new_admin_news_item_path
else
begin
- if page_name =~ /the news item titled "?([^\"]*)"?/ and (news_item = NewsItem.find_by_title($1)).present?
+ if page_name =~ /the news item titled "?([^\"]*)"?/ and (news_item = NewsItem.where(:title => $1).first).present?
self.url_for(news_item)
else
nil
end
rescue