Sha256: fee1dd3f902610ad4b770cd67fe818d10def69a0c23c9fcb1663c521ec81221b
Contents?: true
Size: 519 Bytes
Versions: 14
Compression:
Stored size: 519 Bytes
Contents
module Sunrise module StructureHelper def manage_structure_path(record, options = {}) return "#" if record.nil? options = {:parent_id => record.id, :parent_type => 'Structure'}.merge(options) case record.structure_type.kind when :page then edit_path(:model_name => "pages", :id => record.id) when :posts then index_path(options.merge({:model_name => record.structure_type.kind})) else edit_path(:model_name => "structures", :id => record.id) end end end end
Version data entries
14 entries across 14 versions & 1 rubygems