Sha256: 99e1d1162d3222f730585024d967b9d860f3fe70a88630f6b5e86da1c09a169b

Contents?: true

Size: 811 Bytes

Versions: 38

Compression:

Stored size: 811 Bytes

Contents

require 'fiona7/controller_helper'

module Fiona7
  class BlobsController < ApplicationController
    include Fiona7::BinaryHandling::DeliveryMixin
    include Fiona7::ControllerHelper
    include RailsConnector::CmsAccessible

    before_filter :load_obj
    before_filter :ensure_object_is_active
    before_filter :ensure_object_is_permitted

    protected
    def load_obj
      @obj = Fiona7::WriteObj.find(binary_id_from_params)
    end

    def render_obj_error(code, msg)
      head code
    end

    def binary_id_from_params
      params[:id]
    end

    def transformation_from_params
      if params[:t]
        BinaryHandling::ParamEncoder.new.decode(
          params[:t]
        )
      end
    end

    def simple_set_header(name, value)
      response.headers[name] = value
    end
  end
end

Version data entries

38 entries across 38 versions & 1 rubygems

Version Path
infopark_fiona7-1.2.0.0.0 app/controllers/fiona7/blobs_controller.rb
infopark_fiona7-1.1.0.0.9 app/controllers/fiona7/blobs_controller.rb
infopark_fiona7-1.1.0.0.8 app/controllers/fiona7/blobs_controller.rb
infopark_fiona7-1.1.0.0.7 app/controllers/fiona7/blobs_controller.rb
infopark_fiona7-1.1.0.0.6 app/controllers/fiona7/blobs_controller.rb
infopark_fiona7-1.1.0.0.5 app/controllers/fiona7/blobs_controller.rb
infopark_fiona7-1.1.0.0.4 app/controllers/fiona7/blobs_controller.rb
infopark_fiona7-1.1.0.0.3 app/controllers/fiona7/blobs_controller.rb
infopark_fiona7-1.1.0.0.2 app/controllers/fiona7/blobs_controller.rb
infopark_fiona7-1.1.0.0.10 app/controllers/fiona7/blobs_controller.rb
infopark_fiona7-1.1.0.0.1 app/controllers/fiona7/blobs_controller.rb
infopark_fiona7-1.1.0.0.0 app/controllers/fiona7/blobs_controller.rb
infopark_fiona7-0.71.1.9 app/controllers/fiona7/blobs_controller.rb
infopark_fiona7-0.71.1.8 app/controllers/fiona7/blobs_controller.rb
infopark_fiona7-0.71.1.7 app/controllers/fiona7/blobs_controller.rb
infopark_fiona7-0.71.1.12 app/controllers/fiona7/blobs_controller.rb
infopark_fiona7-0.71.1.11 app/controllers/fiona7/blobs_controller.rb
infopark_fiona7-0.71.1.10 app/controllers/fiona7/blobs_controller.rb