blocks are loaded from fixtures as well
Oleg
committed Apr 13, 2011
commit 4f2861528aab3dd9a86521fcadef4ceb0cfdeede
Showing 1
changed file with
1 additions
and 1 deletions
comfortable_mexican_sofa/view_methods.rb b/lib/comfortable_mexican_sofa/view_methods.rb
+1
-1
| @@ | @@ -33,7 +33,7 @@ module ComfortableMexicanSofa::ViewMethods |
| # cms_page_content(:left_column) # if @cms_page is present | |
| def cms_page_content(block_label, page = nil) | |
| return '' unless page ||= @cms_page | |
| - | return '' unless block = page.cms_blocks.find_by_label(block_label) |
| + | return '' unless block = page.cms_blocks.select{|b| b.label == block_label}.first |
| block.content.to_s.html_safe | |
| end | |
| end | |