Sha256: 62c2063e28ed1f53ac4b266a5ba90f115e95b9118130c90e6f5f0447e0bfdaf8

Contents?: true

Size: 469 Bytes

Versions: 4

Compression:

Stored size: 469 Bytes

Contents

module BucketMakerConcern
  extend ActiveSupport::Concern

  included do
    layout false

    before_filter :showable?, :extract_params

    private
    def showable?
      unless @current_user && BucketMaker.configured?
        head :unauthorized
        false
      end
    end

    def extract_params
      @series_name  = params[:series_name] || ''
      @bucket_name  = params[:bucket_name] || ''
      @group_name   = params[:group_name] || ''
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
bucket_maker-0.0.4 app/controllers/concerns/bucket_maker_concern.rb
bucket_maker-0.0.3 app/controllers/concerns/bucket_maker_concern.rb
bucket_maker-0.0.2 app/controllers/concerns/bucket_maker_concern.rb
bucket_maker-0.0.1 app/controllers/concerns/bucket_maker_concern.rb