Skip to content

Instantly share code, notes, and snippets.

@gamesthatgive
Created November 24, 2010 03:05

Revisions

  1. gamesthatgive created this gist Nov 24, 2010.
    11 changes: 11 additions & 0 deletions gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,11 @@
    def top_redirect_to(path)
    render :layout => false, :partial => "shared/top_redirect", :object => path
    end

    %html
    %head
    %noscript
    %meta{ "http-equiv" => "refresh", :content => "0;url=#{top_redirect}" }/
    %meta{ "http-equiv" => "window-target", :content => "_top" }/
    :javascript
    window.top.location.href = #{top_redirect.to_json};