app/models/comatose/page.rb
# Returns a pages URI dynamically, based on the active mount point
Returns a pages URI dynamically, based on the active mount point
Returns a pages URI dynamically based on the active mount point
def uri
      if full_path == ''
        active_mount_info[:root]
      else
        page_path = (full_path || '').split('/')
        idx_path = active_mount_info[:index].split('/')
        uri_root = active_mount_info[:root].split('/')
        uri_path = ( uri_root + (page_path - idx_path) ).flatten.delete_if {|i| i == "" }
        ['',uri_path].join('/')
      end
    end
def uri if full_path == '' active_mount_info [ :root ] else page_path = ( full_path || '' ) . split ( '/' ) idx_path = active_mount_info [ :index ] . split ( '/' ) uri_root = active_mount_info [ :root ] . split ( '/' ) uri_path = ( uri_root + ( page_path - idx_path ) ) . flatten . delete_if { | i | i == "" } [ '' , uri_path ] . join ( '/' ) end end
Returns a pages URI dynamically, based on the active mount point
Returns a pages URI dynamically based on the active mount point