Sha256: 643ba2d9cd1b49821fec5ef1d5bff2758db2162a0213086ccb7431c99c420f70

Contents?: true

Size: 440 Bytes

Versions: 2

Compression:

Stored size: 440 Bytes

Contents

module Clipster
  class ApplicationController < ActionController::Base
    before_filter :set_current_user

    private
      def set_current_user
        begin
          Clip.current_user = current_user if Clipster.config.associates_clip_with_user
        rescue Exception => e
          raise "If User assocations have been enabled for Clipster, your application should have a current_user helper defined"
        end
      end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
clipster-0.5.3 app/controllers/clipster/application_controller.rb
clipster-0.4.0 app/controllers/clipster/application_controller.rb