cirandas.net

ref: master

app/controllers/embed_controller.rb


 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
class EmbedController < ApplicationController
  layout 'embed'

  def block
    @block = Block.find(params[:id])
    if !@block.embedable? || !@block.visible?
      render 'unavailable', :status => 403
    end
    rescue ActiveRecord::RecordNotFound
      render 'not_found', :status => 404
  end

end