Created
September 12, 2012 08:52
-
-
Save kiote/3705353 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def get_content_blocks | |
| page_name = "#{params[:controller]}_#{params[:action]}" | |
| page = Page.where(name: page_name).first.contents rescue [] | |
| page.each { |obj| instance_variable_set("@"+obj.name, obj.body) } | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment