Module: Manage::StructuresHelper

Defined in:
lib/generators/sunrise/templates/helpers/manage/structures_helper.rb

Instance Method Summary collapse

Instance Method Details

#edit_structure_record_path(structure) ⇒ Object



3
4
5
6
7
8
9
10
11
# File 'lib/generators/sunrise/templates/helpers/manage/structures_helper.rb', line 3

def edit_structure_record_path(structure)                   
  case structure.structure_type
    when StructureType.page then edit_manage_structure_page_path(:structure_id=>structure.id)      
    when StructureType.posts then manage_structure_posts_path(:structure_id => structure.id)
    when StructureType.main then '#'
    when StructureType.redirect then structure.slug
    when StructureType.group then '#'
  end
end