Sha256: ab61e33a1af23c53bb1a52b1029fe0e0eda0b17c4620e25b4b23ec822f765e85

Contents?: true

Size: 605 Bytes

Versions: 3

Compression:

Stored size: 605 Bytes

Contents

module Admin::StructuresHelper

  def edit_structure_record_path(structure)
    case structure.structure_type
      when StructureType.static_page
        if structure.static_page
          edit_admin_structure_static_page_path(:structure_id => structure.id)
        else
          new_admin_structure_static_page_path(:structure_id => structure.id)
        end
      when StructureType.posts
        '#'
      when StructureType.main
        '#'
      when StructureType.redirect
        edit_admin_structure_path(item)
      when StructureType.group
        '#'
      else
        '#'
    end
  end

end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
ab_admin-0.1.2 lib/generators/ab_admin/install/templates/helpers/admin/structures_helper.rb
ab_admin-0.1.1 lib/generators/ab_admin/install/templates/helpers/admin/structures_helper.rb
ab_admin-0.1.0 lib/generators/ab_admin/install/templates/helpers/admin/structures_helper.rb