It's rather "bare" than "raw"

openid
Marcin Kulik 11 years ago
parent 585167089d
commit edca76233d

@ -1,6 +1,6 @@
class AsciicastsController < ApplicationController
before_filter :load_resource, :only => [:show, :raw, :example, :edit, :update, :destroy]
before_filter :load_resource, :only => [:show, :bare, :example, :edit, :update, :destroy]
before_filter :ensure_authenticated!, :only => [:edit, :update, :destroy]
before_filter :ensure_owner!, :only => [:edit, :update, :destroy]
@ -34,10 +34,10 @@ class AsciicastsController < ApplicationController
end
end
def raw
def bare
response.headers.delete('X-Frame-Options')
render locals: { page: BareAsciicastPresenter.build(asciicast, params) },
layout: 'raw'
layout: 'bare'
end
def example

@ -46,7 +46,7 @@
insertAfter(script, container);
iframe = document.createElement('iframe');
iframe.src = "<%= request.protocol %><%= request.host_with_port %>/a/<%= @asciicast.id %>/raw" + params(container, script);
iframe.src = "<%= request.protocol %><%= request.host_with_port %>/a/<%= @asciicast.id %>/bare" + params(container, script);
iframe.id = "asciicast-iframe-<%= @asciicast.id %>";
iframe.name = "asciicast-iframe-<%= @asciicast.id %>";
iframe.scrolling = "no";

@ -5,7 +5,8 @@ Asciinema::Application.routes.draw do
resources :asciicasts, :path => 'a' do
member do
get :raw
get :bare
get :raw, action: :bare
get :example
end
end

Loading…
Cancel
Save