Sha256: 7309ec06dc1a6934c8d1dc3fa1b630ad6986099d1c8b77f41e89efb7ee45ec2d

Contents?: true

Size: 1.61 KB

Versions: 17

Compression:

Stored size: 1.61 KB

Contents

# EffectiveAssets Rails Engine

EffectiveAssets.setup do |config|
  config.assets_table_name = :assets
  config.attachments_table_name = :attachments

  config.uploader = TestAssetUploader   # Must extend from EffectiveAssetsUploader

  # Authorization Method
  #
  # This method is called by all controller actions with the appropriate action and resource
  # If the method returns false, an Effective::AccessDenied Error will be raised (see README.md for complete info)
  #
  # Use via Proc (and with CanCan):
  # config.authorization_method = Proc.new { |controller, action, resource| authorize!(action, resource) }
  #
  # Use via custom method:
  # config.authorization_method = :my_authorization_method
  #
  # And then in your application_controller.rb:
  #
  # def my_authorization_method(action, resource)
  #   current_user.is?(:admin)
  # end
  #
  # Or disable the check completely:
  # config.authorization_method = false
  config.authorization_method = Proc.new { |controller, action, resource| true } # All users can see every screen

  # This is your S3 bucket information
  config.aws_bucket = ''
  config.aws_access_key_id = ''
  config.aws_secret_access_key = ''
  config.aws_region = 'us-east-1'

  config.aws_path = 'assets/'

  # This is the default aws_acl all assets will be created with
  # Unless you override the value by passing :aws_acl => '' to the asset_box_input, Asset.create_from_url, or Asset.create_from_string
  # Valid settings are public-read, authenticated-read
  config.aws_acl = 'public-read'

  # Register Effective::Asset with ActiveAdmin if ActiveAdmin is present
  config.use_active_admin = true
end

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
effective_assets-1.6.9 lib/generators/templates/effective_assets.rb
effective_assets-1.6.8 lib/generators/templates/effective_assets.rb
effective_assets-1.6.7 lib/generators/templates/effective_assets.rb
effective_assets-1.6.6 lib/generators/templates/effective_assets.rb
effective_assets-1.6.5 lib/generators/templates/effective_assets.rb
effective_assets-1.6.4 lib/generators/templates/effective_assets.rb
effective_assets-1.6.3 lib/generators/templates/effective_assets.rb
effective_assets-1.6.2 lib/generators/templates/effective_assets.rb
effective_assets-1.6.1 lib/generators/templates/effective_assets.rb
effective_assets-1.6.0 lib/generators/templates/effective_assets.rb
effective_assets-1.5.9 lib/generators/templates/effective_assets.rb
effective_assets-1.5.8 lib/generators/templates/effective_assets.rb
effective_assets-1.5.7 lib/generators/templates/effective_assets.rb
effective_assets-1.5.6 lib/generators/templates/effective_assets.rb
effective_assets-1.5.5 lib/generators/templates/effective_assets.rb
effective_assets-1.5.4 lib/generators/templates/effective_assets.rb
effective_assets-1.5.3 lib/generators/templates/effective_assets.rb