Module: Pageflow::PageTypesHelper
- Includes:
- RenderJsonHelper
- Defined in:
- app/helpers/pageflow/page_types_helper.rb
Constant Summary
Constants included from RenderJsonHelper
RenderJsonHelper::ESCAPED_CHARS, RenderJsonHelper::ESCAPED_CHARS_REGEX
Instance Method Summary collapse
Methods included from RenderJsonHelper
#render_html_partial, #render_json_partial, #render_json_seed, #render_with_format, #sanitize_json
Instance Method Details
#page_type_json_seeds ⇒ Object
5 6 7 |
# File 'app/helpers/pageflow/page_types_helper.rb', line 5 def page_type_json_seeds render_json_partial('pageflow/page_types/page_type', :collection => Pageflow.config.page_types, :as => :page_type) end |
#page_type_templates ⇒ Object
9 10 11 12 13 14 15 16 17 |
# File 'app/helpers/pageflow/page_types_helper.rb', line 9 def page_type_templates safe_join(Pageflow.config.page_types.map do |page_type| content_tag(:script, render_to_string(:template => page_type.template_path, :locals => {:configuration => {}, :page => Page.new}, :layout => false).to_str, :type => 'text/html', :data => {:template => "#{page_type.name}_page"}) end) end |